diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2015-03-21 19:11:55 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-04-11 22:27:10 -0400 |
commit | d4fb392f4c5e57197a43b729e6fad5e02e5acaca (patch) | |
tree | 4c41baf749a79a07c5232d9150ff58cea5729766 /fs/aio.c | |
parent | 36e9f6535f398952772df5238b23e795a2810f86 (diff) |
kill aio_setup_single_vector()
identical to import_single_range()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/aio.c')
-rw-r--r-- | fs/aio.c | 18 |
1 files changed, 1 insertions, 17 deletions
@@ -1376,21 +1376,6 @@ static int aio_setup_vectored_rw(int rw, char __user *buf, size_t len, | |||
1376 | return 0; | 1376 | return 0; |
1377 | } | 1377 | } |
1378 | 1378 | ||
1379 | static int aio_setup_single_vector(int rw, char __user *buf, size_t len, | ||
1380 | struct iovec *iovec, | ||
1381 | struct iov_iter *iter) | ||
1382 | { | ||
1383 | if (len > MAX_RW_COUNT) | ||
1384 | len = MAX_RW_COUNT; | ||
1385 | if (unlikely(!access_ok(!rw, buf, len))) | ||
1386 | return -EFAULT; | ||
1387 | |||
1388 | iovec->iov_base = buf; | ||
1389 | iovec->iov_len = len; | ||
1390 | iov_iter_init(iter, rw, iovec, 1, len); | ||
1391 | return 0; | ||
1392 | } | ||
1393 | |||
1394 | /* | 1379 | /* |
1395 | * aio_run_iocb: | 1380 | * aio_run_iocb: |
1396 | * Performs the initial checks and io submission. | 1381 | * Performs the initial checks and io submission. |
@@ -1434,8 +1419,7 @@ rw_common: | |||
1434 | ret = aio_setup_vectored_rw(rw, buf, len, | 1419 | ret = aio_setup_vectored_rw(rw, buf, len, |
1435 | &iovec, compat, &iter); | 1420 | &iovec, compat, &iter); |
1436 | else | 1421 | else |
1437 | ret = aio_setup_single_vector(rw, buf, len, | 1422 | ret = import_single_range(rw, buf, len, iovec, &iter); |
1438 | iovec, &iter); | ||
1439 | if (!ret) | 1423 | if (!ret) |
1440 | ret = rw_verify_area(rw, file, &req->ki_pos, | 1424 | ret = rw_verify_area(rw, file, &req->ki_pos, |
1441 | iov_iter_count(&iter)); | 1425 | iov_iter_count(&iter)); |