summaryrefslogtreecommitdiffstats
path: root/block/bio.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2017-09-24 18:09:21 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2017-10-11 23:23:40 +0200
commit2884d0be878eb5cbbc6d983c6054feef3b9aa86d (patch)
tree42e348c37835e12a4088fbf37b50b715aef4be0c /block/bio.c
parentblk_rq_map_user_iov(): move iov_iter_advance() down (diff)
downloadlinux-2884d0be878eb5cbbc6d983c6054feef3b9aa86d.tar.xz
linux-2884d0be878eb5cbbc6d983c6054feef3b9aa86d.zip
move more stuff down into bio_copy_user_iov()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'block/bio.c')
-rw-r--r--block/bio.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/block/bio.c b/block/bio.c
index cd1282db03cb..02457c2d4379 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -1289,6 +1289,9 @@ struct bio *bio_copy_user_iov(struct request_queue *q,
if (ret)
goto cleanup;
+ if (map_data)
+ map_data->offset += bio->bi_iter.bi_size;
+
/*
* success
*/
@@ -1301,6 +1304,8 @@ struct bio *bio_copy_user_iov(struct request_queue *q,
iov_iter_advance(iter, bio->bi_iter.bi_size);
bio->bi_private = bmd;
+ if (map_data && map_data->null_mapped)
+ bio_set_flag(bio, BIO_NULL_MAPPED);
return bio;
cleanup:
if (!map_data)