Skip to content

Commit

Permalink
blk_rq_map_user(): use import_single_range()
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Al Viro committed Apr 12, 2015
1 parent e272b89 commit 8f7e885
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions block/blk-map.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 8f7e885

Please sign in to comment.