forked from luck/tmp_suning_uos_patched
blk_rq_map_user(): use import_single_range()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
e272b89ff8
commit
8f7e885a4c
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user