summaryrefslogtreecommitdiff
path: root/fs/aio.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2015-04-04 01:14:53 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2015-04-11 22:29:43 -0400
commit8436318205b9f29e45db88850ec60e326327e241 (patch)
tree4339c116819e9e6d8e61a1876d9d0d08d0ee089c /fs/aio.c
parent1c65d98672e09a0cb28e1e9ae49e9d96355f522f (diff)
->aio_read and ->aio_write removed
no remaining users Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/aio.c')
-rw-r--r--fs/aio.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/fs/aio.c b/fs/aio.c
index f0b0a2f8a63f..8eece807abed 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -1347,8 +1347,6 @@ SYSCALL_DEFINE1(io_destroy, aio_context_t, ctx)
return -EINVAL;
}
-typedef ssize_t (aio_rw_op)(struct kiocb *, const struct iovec *,
- unsigned long, loff_t);
typedef ssize_t (rw_iter_op)(struct kiocb *, struct iov_iter *);
static int aio_setup_vectored_rw(int rw, char __user *buf, size_t len,
@@ -1377,7 +1375,6 @@ static ssize_t aio_run_iocb(struct kiocb *req, unsigned opcode,
ssize_t ret;
int rw;
fmode_t mode;
- aio_rw_op *rw_op;
rw_iter_op *iter_op;
struct iovec inline_vecs[UIO_FASTIOV], *iovec = inline_vecs;
struct iov_iter iter;
@@ -1387,7 +1384,6 @@ static ssize_t aio_run_iocb(struct kiocb *req, unsigned opcode,
case IOCB_CMD_PREADV:
mode = FMODE_READ;
rw = READ;
- rw_op = file->f_op->aio_read;
iter_op = file->f_op->read_iter;
goto rw_common;
@@ -1395,14 +1391,13 @@ static ssize_t aio_run_iocb(struct kiocb *req, unsigned opcode,
case IOCB_CMD_PWRITEV:
mode = FMODE_WRITE;
rw = WRITE;
- rw_op = file->f_op->aio_write;
iter_op = file->f_op->write_iter;
goto rw_common;
rw_common:
if (unlikely(!(file->f_mode & mode)))
return -EBADF;
- if (!rw_op && !iter_op)
+ if (!iter_op)
return -EINVAL;
if (opcode == IOCB_CMD_PREADV || opcode == IOCB_CMD_PWRITEV)
@@ -1425,11 +1420,7 @@ rw_common:
if (rw == WRITE)
file_start_write(file);
- if (iter_op) {
- ret = iter_op(req, &iter);
- } else {
- ret = rw_op(req, iter.iov, iter.nr_segs, req->ki_pos);
- }
+ ret = iter_op(req, &iter);
if (rw == WRITE)
file_end_write(file);