diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2015-03-21 20:06:04 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-04-11 22:27:13 -0400 |
commit | 8f7e885a4cc167f8b1931800fa1319772ae4b11d (patch) | |
tree | c6bda5eac7995f9330120ddafcb1afe6b9086632 /block | |
parent | e272b89ff8fb63902294ba6eadd14729e2880ade (diff) | |
download | op-kernel-dev-8f7e885a4cc167f8b1931800fa1319772ae4b11d.zip op-kernel-dev-8f7e885a4cc167f8b1931800fa1319772ae4b11d.tar.gz |
blk_rq_map_user(): use import_single_range()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-map.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/block/blk-map.c b/block/blk-map.c index b8d2725..da310a1 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, { struct iovec iov; struct iov_iter i; + int ret = import_single_range(rq_data_dir(rq), ubuf, len, &iov, &i); - iov.iov_base = ubuf; - iov.iov_len = len; - iov_iter_init(&i, rq_data_dir(rq), &iov, 1, len); + if (unlikely(ret < 0)) + return ret; return blk_rq_map_user_iov(q, rq, map_data, &i, gfp_mask); } |