Skip to content

Commit

Permalink
make aio_read()/aio_write() return int
Browse files Browse the repository at this point in the history
that ssize_t is a rudiment of earlier calling conventions; it's been
used only to pass 0 and -E... since last autumn.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Mar 18, 2019
1 parent af5c72b commit 958c13c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions fs/aio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1513,13 +1513,13 @@ static inline void aio_rw_done(struct kiocb *req, ssize_t ret)
}
}

static ssize_t aio_read(struct kiocb *req, const struct iocb *iocb,
static int aio_read(struct kiocb *req, const struct iocb *iocb,
bool vectored, bool compat)
{
struct iovec inline_vecs[UIO_FASTIOV], *iovec = inline_vecs;
struct iov_iter iter;
struct file *file;
ssize_t ret;
int ret;

ret = aio_prep_rw(req, iocb);
if (ret)
Expand All @@ -1541,13 +1541,13 @@ static ssize_t aio_read(struct kiocb *req, const struct iocb *iocb,
return ret;
}

static ssize_t aio_write(struct kiocb *req, const struct iocb *iocb,
static int aio_write(struct kiocb *req, const struct iocb *iocb,
bool vectored, bool compat)
{
struct iovec inline_vecs[UIO_FASTIOV], *iovec = inline_vecs;
struct iov_iter iter;
struct file *file;
ssize_t ret;
int ret;

ret = aio_prep_rw(req, iocb);
if (ret)
Expand Down Expand Up @@ -1710,7 +1710,7 @@ aio_poll_queue_proc(struct file *file, struct wait_queue_head *head,
add_wait_queue(head, &pt->iocb->poll.wait);
}

static ssize_t aio_poll(struct aio_kiocb *aiocb, const struct iocb *iocb)
static int aio_poll(struct aio_kiocb *aiocb, const struct iocb *iocb)
{
struct kioctx *ctx = aiocb->ki_ctx;
struct poll_iocb *req = &aiocb->poll;
Expand Down Expand Up @@ -1775,7 +1775,7 @@ static int __io_submit_one(struct kioctx *ctx, const struct iocb *iocb,
struct iocb __user *user_iocb, bool compat)
{
struct aio_kiocb *req;
ssize_t ret;
int ret;

/* enforce forwards compatibility on users */
if (unlikely(iocb->aio_reserved2)) {
Expand Down

0 comments on commit 958c13c

Please sign in to comment.