diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2019-04-03 02:22:35 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2019-04-03 12:47:36 -0400 |
commit | 18bfb9c6a8a5fbfe1a732130bb8f65fcfc4e8aa2 (patch) | |
tree | 4dc3b33c7cdcc7d0e5564d3e9dd0ab8c3cad72ac | |
parent | 5e7a8ca319268a70a6c7c3c1fde5bea38e1e5539 (diff) |
aio: Fix an error code in __io_submit_one()
This accidentally returns the wrong variable. The "req->ki_eventfd"
pointer is NULL so this return success.
Fixes: 7316b49c2a11 ("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>
-rw-r--r-- | fs/aio.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1794,7 +1794,7 @@ static int __io_submit_one(struct kioctx *ctx, const struct iocb *iocb, | |||
1794 | */ | 1794 | */ |
1795 | eventfd = eventfd_ctx_fdget(iocb->aio_resfd); | 1795 | eventfd = eventfd_ctx_fdget(iocb->aio_resfd); |
1796 | if (IS_ERR(eventfd)) | 1796 | if (IS_ERR(eventfd)) |
1797 | return PTR_ERR(req->ki_eventfd); | 1797 | return PTR_ERR(eventfd); |
1798 | 1798 | ||
1799 | req->ki_eventfd = eventfd; | 1799 | req->ki_eventfd = eventfd; |
1800 | } | 1800 | } |