mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
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>
This commit is contained in:
parent
86b6c7a7f7
commit
84e9e03c55
@ -143,6 +143,7 @@ int blk_rq_map_user(struct request_queue *q, struct request *rq,
|
||||
return 0;
|
||||
unmap_rq:
|
||||
blk_rq_unmap_user(bio);
|
||||
rq->bio = NULL;
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL(blk_rq_map_user);
|
||||
|
Loading…
Reference in New Issue
Block a user