From: Dan Carpenter Date: Mon, 11 Oct 2010 19:15:11 +0000 (+0200) Subject: rbd: passing wrong variable to bvec_kunmap_irq() X-Git-Tag: v2.6.37-rc3~2^2~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=85b5aaa624aac568b8a3a88dbe4de6628c7cc527;p=platform%2Fkernel%2Flinux-3.10.git rbd: passing wrong variable to bvec_kunmap_irq() 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 Signed-off-by: Sage Weil --- 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; }