You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[PATCH] Fixup blk_rq_unmap_user() API
The blk_rq_unmap_user() API is not very nice. It expects the caller to know that rq->bio has to be reset to the original bio, and it will silently do nothing if that is not done. Instead make it explicit that we need to pass in the first bio, by expecting a bio argument. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
This commit is contained in:
+1
-2
@@ -333,8 +333,7 @@ static int sg_io(struct file *file, request_queue_t *q,
|
||||
hdr->sb_len_wr = len;
|
||||
}
|
||||
|
||||
rq->bio = bio;
|
||||
if (blk_rq_unmap_user(rq))
|
||||
if (blk_rq_unmap_user(bio))
|
||||
ret = -EFAULT;
|
||||
|
||||
/* may not have succeeded, but output values written to control
|
||||
|
||||
Reference in New Issue
Block a user