aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Axboe2008-02-18 06:51:56 -0600
committerJens Axboe2008-02-19 03:04:00 -0600
commit84e9e03c55c2456799ab19f1d577e72f721fdd39 (patch)
treee268a42aa43b6dae3c4f4c8d5c4b2e24d6e2d65a /block/blk-map.c
parent86b6c7a7f78feca58d2d8615e53aee4d59ab9dc6 (diff)
downloadkernel-common-84e9e03c55c2456799ab19f1d577e72f721fdd39.tar.gz
kernel-common-84e9e03c55c2456799ab19f1d577e72f721fdd39.tar.xz
kernel-common-84e9e03c55c2456799ab19f1d577e72f721fdd39.zip
block: make blk_rq_map_user() clear ->bio if it unmaps it
That way the interface is symmetric, and calling blk_rq_unmap_user() on the request wont oops. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/blk-map.c')
-rw-r--r--block/blk-map.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/block/blk-map.c b/block/blk-map.c
index 955d75c1a58..bc5ce60691c 100644
--- a/block/blk-map.c
+++ b/block/blk-map.c
@@ -143,6 +143,7 @@ int blk_rq_map_user(struct request_queue *q, struct request *rq,
143 return 0; 143 return 0;
144unmap_rq: 144unmap_rq:
145 blk_rq_unmap_user(bio); 145 blk_rq_unmap_user(bio);
146 rq->bio = NULL;
146 return ret; 147 return ret;
147} 148}
148EXPORT_SYMBOL(blk_rq_map_user); 149EXPORT_SYMBOL(blk_rq_map_user);