* [patch 2/2 -next] rbd: passing wrong variable to bvec_kunmap_irq()
@ 2010-10-11 19:15 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2010-10-11 19:15 UTC (permalink / raw)
To: Yehuda Sadeh; +Cc: Sage Weil, ceph-devel, kernel-janitors
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;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [patch 2/2 -next] rbd: passing wrong variable to bvec_kunmap_irq()
@ 2010-10-11 19:15 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2010-10-11 19:15 UTC (permalink / raw)
To: Yehuda Sadeh; +Cc: Sage Weil, ceph-devel, kernel-janitors
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;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-10-11 19:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-11 19:15 [patch 2/2 -next] rbd: passing wrong variable to bvec_kunmap_irq() Dan Carpenter
2010-10-11 19:15 ` Dan Carpenter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.