提交 18bfb9c6 编写于 作者: D Dan Carpenter 提交者: Al Viro

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: 7316b49c ("aio: move sanity checks and request allocation to io_submit_one()")
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 5e7a8ca3
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册