forked from Minki/linux
move more stuff down into bio_copy_user_iov()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
e81cef5d30
commit
2884d0be87
@ -1289,6 +1289,9 @@ struct bio *bio_copy_user_iov(struct request_queue *q,
|
|||||||
if (ret)
|
if (ret)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
if (map_data)
|
||||||
|
map_data->offset += bio->bi_iter.bi_size;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* success
|
* success
|
||||||
*/
|
*/
|
||||||
@ -1301,6 +1304,8 @@ struct bio *bio_copy_user_iov(struct request_queue *q,
|
|||||||
iov_iter_advance(iter, bio->bi_iter.bi_size);
|
iov_iter_advance(iter, bio->bi_iter.bi_size);
|
||||||
|
|
||||||
bio->bi_private = bmd;
|
bio->bi_private = bmd;
|
||||||
|
if (map_data && map_data->null_mapped)
|
||||||
|
bio_set_flag(bio, BIO_NULL_MAPPED);
|
||||||
return bio;
|
return bio;
|
||||||
cleanup:
|
cleanup:
|
||||||
if (!map_data)
|
if (!map_data)
|
||||||
|
@ -66,12 +66,6 @@ static int __blk_rq_map_user_iov(struct request *rq,
|
|||||||
bio->bi_opf &= ~REQ_OP_MASK;
|
bio->bi_opf &= ~REQ_OP_MASK;
|
||||||
bio->bi_opf |= req_op(rq);
|
bio->bi_opf |= req_op(rq);
|
||||||
|
|
||||||
if (map_data && map_data->null_mapped)
|
|
||||||
bio_set_flag(bio, BIO_NULL_MAPPED);
|
|
||||||
|
|
||||||
if (map_data)
|
|
||||||
map_data->offset += bio->bi_iter.bi_size;
|
|
||||||
|
|
||||||
orig_bio = bio;
|
orig_bio = bio;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user