rbd: passing wrong variable to bvec_kunmap_irq()
authorDan Carpenter <error27@gmail.com>
Mon, 11 Oct 2010 19:15:11 +0000 (21:15 +0200)
committerSage Weil <sage@newdream.net>
Wed, 20 Oct 2010 22:38:25 +0000 (15:38 -0700)
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>
Signed-off-by: Sage Weil <sage@newdream.net>
drivers/block/rbd.c

index 52f9420704c7d6fd12f200e2e9525167d74902db..6ec9d53806c5e791b5d56fa0ae27dae0e903db02 100644 (file)
@@ -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;
                }