aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
Diffstat (limited to 'block')
-rw-r--r--block/blk-map.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/block/blk-map.c b/block/blk-map.c
index b8d2725324a6..da310a105429 100644
--- a/block/blk-map.c
+++ b/block/blk-map.c
@@ -124,10 +124,10 @@ int blk_rq_map_user(struct request_queue *q, struct request *rq,
124{ 124{
125 struct iovec iov; 125 struct iovec iov;
126 struct iov_iter i; 126 struct iov_iter i;
127 int ret = import_single_range(rq_data_dir(rq), ubuf, len, &iov, &i);
127 128
128 iov.iov_base = ubuf; 129 if (unlikely(ret < 0))
129 iov.iov_len = len; 130 return ret;
130 iov_iter_init(&i, rq_data_dir(rq), &iov, 1, len);
131 131
132 return blk_rq_map_user_iov(q, rq, map_data, &i, gfp_mask); 132 return blk_rq_map_user_iov(q, rq, map_data, &i, gfp_mask);
133} 133}