mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
[SCSI] block: fix the partial mappings with struct rq_map_data
This fixes bio_copy_user_iov to properly handle the partial mappings with struct rq_map_data (which only sg uses for now but st and osst will shortly). It adds the offset member to struct rq_map_data and changes blk_rq_map_user to update it so that bio_copy_user_iov can add an appropriate page frame via bio_add_pc_page(). Signed-off-by: FUJITA Tomonori <[email protected]> Acked-by: Jens Axboe <[email protected]> Signed-off-by: James Bottomley <[email protected]>
This commit is contained in:
parent
e623ddb4e9
commit
56c451f4b5
4 changed files with 14 additions and 3 deletions
|
|
@ -150,6 +150,9 @@ int blk_rq_map_user(struct request_queue *q, struct request *rq,
|
|||
bio = rq->bio;
|
||||
bytes_read += ret;
|
||||
ubuf += ret;
|
||||
|
||||
if (map_data)
|
||||
map_data->offset += ret;
|
||||
}
|
||||
|
||||
if (!bio_flagged(bio, BIO_USER_MAPPED))
|
||||
|
|
|
|||
Loading…
Reference in a new issue