projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e272b89
)
blk_rq_map_user(): use import_single_range()
author
Al Viro
<viro@zeniv.linux.org.uk>
Sun, 22 Mar 2015 00:06:04 +0000
(20:06 -0400)
committer
Al Viro
<viro@zeniv.linux.org.uk>
Sun, 12 Apr 2015 02:27:13 +0000
(22:27 -0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
block/blk-map.c
patch
|
blob
|
blame
|
history
diff --git
a/block/blk-map.c
b/block/blk-map.c
index b8d2725324a6b88391db4c8a5daf7a9c1309dd86..da310a1054299720d1b809d4ac3fd27af02b1e19 100644
(file)
--- 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);
}