Skip to content

Commit

Permalink
block: make blk_rq_map_user() clear ->bio if it unmaps it
Browse files Browse the repository at this point in the history
That way the interface is symmetric, and calling blk_rq_unmap_user()
on the request wont oops.

Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
Jens Axboe committed Feb 19, 2008
1 parent 86b6c7a commit 84e9e03
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions block/blk-map.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 84e9e03

Please sign in to comment.