X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=block%2Fblk-map.c;h=0f4b4b88181178b0344127df63af79f7d95da915;hb=1d678f365dae28420fa7329a2a35390b3582678d;hp=4849fa36161eb697b47b08efa27af085b58bed3c;hpb=54cebc68c81eacac41a21bdfe99dc889d3882c60;p=linux-2.6-omap-h63xx.git diff --git a/block/blk-map.c b/block/blk-map.c index 4849fa36161..0f4b4b88181 100644 --- a/block/blk-map.c +++ b/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;