From: Dan Carpenter <error27@gmail.com>
To: Yehuda Sadeh <yehuda@hq.newdream.net>
Cc: Sage Weil <sage@newdream.net>,
ceph-devel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch 2/2 -next] rbd: passing wrong variable to bvec_kunmap_irq()
Date: Mon, 11 Oct 2010 21:15:11 +0200 [thread overview]
Message-ID: <20101011191511.GJ5851@bicker> (raw)
We should be passing "buf" here insead of "bv". This is tricky because
it's not the same as kmap() and kunmap(). GCC does warn about it if you
compile on i386 with CONFIG_HIGHMEM.
Signed-off-by: Dan Carpenter <error27@gmail.com>
---
If it's any consolation, out of three callers to bvec_kunmap_irq() only
one caller was correct. :P
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 52f9420..6ec9d53 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -554,7 +554,7 @@ static void zero_bio_chain(struct bio *chain, int start_ofs)
buf = bvec_kmap_irq(bv, &flags);
memset(buf + remainder, 0,
bv->bv_len - remainder);
- bvec_kunmap_irq(bv, &flags);
+ bvec_kunmap_irq(buf, &flags);
}
pos += bv->bv_len;
}
reply other threads:[~2010-10-11 19:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101011191511.GJ5851@bicker \
--to=error27@gmail.com \
--cc=ceph-devel@vger.kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=sage@newdream.net \
--cc=yehuda@hq.newdream.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).