From c1abd82aa38e7d99cab604b8be6b0120ba2870cb Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 18 Nov 2008 15:07:05 +0100 Subject: [PATCH] --- yaml --- r: 119167 b: refs/heads/master c: c26156b2534c75bb3cdedf76f6ad1340971cf5bd h: refs/heads/master i: 119165: 9adce279a24aa9c692f1af4d64bbaf2643afa784 119163: 42cb26754d1c09039c9c874fcb1c5665820637b7 119159: bc7e6a4b12f285cb15e9a1e864f432c4dee46d85 119151: 4a0fbd63c8261b8655b9c0189b55d33da7788a40 119135: 8fc27e0bda4fda15abc377e2bea04ab4fc0a8aff 119103: 73025b8ae0456cb31a04df6c857a210014dde73a 119039: 45ddee2e644555227a7b74ff50121e1c3447b7ef v: v3 --- [refs] | 2 +- trunk/block/blk-map.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 3633ee89e5c5..acef20fd9eae 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 98ba4031ab2adc8b394295e68aa4c8fe9d5060db +refs/heads/master: c26156b2534c75bb3cdedf76f6ad1340971cf5bd diff --git a/trunk/block/blk-map.c b/trunk/block/blk-map.c index 4849fa36161e..0f4b4b881811 100644 --- a/trunk/block/blk-map.c +++ b/trunk/block/blk-map.c @@ -217,6 +217,12 @@ 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); return -EINVAL;