Commit 8f7e885a authored by Al Viro's avatar Al Viro

blk_rq_map_user(): use import_single_range()

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent e272b89f
...@@ -124,10 +124,10 @@ int blk_rq_map_user(struct request_queue *q, struct request *rq, ...@@ -124,10 +124,10 @@ int blk_rq_map_user(struct request_queue *q, struct request *rq,
{ {
struct iovec iov; struct iovec iov;
struct iov_iter i; struct iov_iter i;
int ret = import_single_range(rq_data_dir(rq), ubuf, len, &iov, &i);
iov.iov_base = ubuf; if (unlikely(ret < 0))
iov.iov_len = len; return ret;
iov_iter_init(&i, rq_data_dir(rq), &iov, 1, len);
return blk_rq_map_user_iov(q, rq, map_data, &i, gfp_mask); return blk_rq_map_user_iov(q, rq, map_data, &i, gfp_mask);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment