->aio_read and ->aio_write removed

no remaining users

Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
Al Viro 2015-04-04 01:14:53 -04:00
commit 8436318205
8 changed files with 9 additions and 54 deletions

View file

@ -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);