summaryrefslogtreecommitdiff
path: root/block/bio.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/bio.c')
-rw-r--r--block/bio.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/block/bio.c b/block/bio.c
index d1ca7eecc8aa..cd1282db03cb 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -1195,7 +1195,7 @@ int bio_uncopy_user(struct bio *bio)
*/
struct bio *bio_copy_user_iov(struct request_queue *q,
struct rq_map_data *map_data,
- const struct iov_iter *iter,
+ struct iov_iter *iter,
gfp_t gfp_mask)
{
struct bio_map_data *bmd;
@@ -1298,6 +1298,7 @@ struct bio *bio_copy_user_iov(struct request_queue *q,
if (ret)
goto cleanup;
}
+ iov_iter_advance(iter, bio->bi_iter.bi_size);
bio->bi_private = bmd;
return bio;
@@ -1320,7 +1321,7 @@ out_bmd:
* device. Returns an error pointer in case of error.
*/
struct bio *bio_map_user_iov(struct request_queue *q,
- const struct iov_iter *iter,
+ struct iov_iter *iter,
gfp_t gfp_mask)
{
int j;
@@ -1399,6 +1400,7 @@ struct bio *bio_map_user_iov(struct request_queue *q,
* reference to it
*/
bio_get(bio);
+ iov_iter_advance(iter, bio->bi_iter.bi_size);
return bio;
out_unmap: