提交 84e9e03c 编写于 作者: J Jens Axboe

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: NJens Axboe <jens.axboe@oracle.com>
上级 86b6c7a7
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册