Skip to content

Commit 18bfb9c

Browse files
Dan CarpenterAl Viro
authored andcommitted
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: 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>
1 parent 5e7a8ca commit 18bfb9c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/aio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1794,7 +1794,7 @@ static int __io_submit_one(struct kioctx *ctx, const struct iocb *iocb,
17941794
*/
17951795
eventfd = eventfd_ctx_fdget(iocb->aio_resfd);
17961796
if (IS_ERR(eventfd))
1797-
return PTR_ERR(req->ki_eventfd);
1797+
return PTR_ERR(eventfd);
17981798

17991799
req->ki_eventfd = eventfd;
18001800
}

0 commit comments

Comments
 (0)