Skip to content

Commit

Permalink
aio: Fix an error code in __io_submit_one()
Browse files Browse the repository at this point in the history
This accidentally returns the wrong variable.  The "req->ki_eventfd"
pointer is NULL so this return success.

Fixes: 7316b49 ("aio: move sanity checks and request allocation to io_submit_one()")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Dan Carpenter authored and Al Viro committed Apr 3, 2019
1 parent 5e7a8ca commit 18bfb9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/aio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1794,7 +1794,7 @@ static int __io_submit_one(struct kioctx *ctx, const struct iocb *iocb,
*/
eventfd = eventfd_ctx_fdget(iocb->aio_resfd);
if (IS_ERR(eventfd))
return PTR_ERR(req->ki_eventfd);
return PTR_ERR(eventfd);

req->ki_eventfd = eventfd;
}
Expand Down

0 comments on commit 18bfb9c

Please sign in to comment.