summaryrefslogtreecommitdiff
path: root/block/blk-map.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-12-16 20:57:41 +0100
committerIngo Molnar <mingo@elte.hu>2008-12-16 20:57:41 +0100
commitdd7a5230cd651bfb119d222561c4032f30dd5659 (patch)
tree85628ef75d1f512f43df6f760980b6cce6cf40c7 /block/blk-map.c
parent050dc6944b9ca2186f4729ab44e0da3743933941 (diff)
parent8b1fae4e4200388b64dd88065639413cb3f1051c (diff)
Merge commit 'v2.6.28-rc8' into x86/cpufeature
Diffstat (limited to 'block/blk-map.c')
-rw-r--r--block/blk-map.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/block/blk-map.c b/block/blk-map.c
index 4849fa36161e..2990447f45e9 100644
--- a/block/blk-map.c
+++ b/block/blk-map.c
@@ -217,8 +217,14 @@ int blk_rq_map_user_iov(struct request_queue *q, struct request *rq,
return PTR_ERR(bio);
if (bio->bi_size != len) {
+ /*
+ * Grab an extra reference to this bio, as bio_unmap_user()
+ * expects to be able to drop it twice as it happens on the
+ * normal IO completion path
+ */
+ bio_get(bio);
bio_endio(bio, 0);
- bio_unmap_user(bio);
+ __blk_rq_unmap_user(bio);
return -EINVAL;
}