Skip to content

Commit

Permalink
io_uring/net: use right helpers for async_data
Browse files Browse the repository at this point in the history
There is another spot where we check ->async_data directly instead of
using req_has_async_data(), which is the way to do it, fix it up.

Fixes: 43e0bbb ("io_uring: add netmsg cache")
Signed-off-by: Pavel Begunkov <[email protected]>
Link: https://lore.kernel.org/r/42f33b9a81dd6ae65dda92f0372b0ff82d548517.1660822636.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
isilence authored and axboe committed Aug 18, 2022
1 parent 5993000 commit 3f743e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions io_uring/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ static int io_setup_async_msg(struct io_kiocb *req,
struct io_async_msghdr *kmsg,
unsigned int issue_flags)
{
struct io_async_msghdr *async_msg = req->async_data;
struct io_async_msghdr *async_msg;

if (async_msg)
if (req_has_async_data(req))
return -EAGAIN;
async_msg = io_recvmsg_alloc_async(req, issue_flags);
if (!async_msg) {
Expand Down

0 comments on commit 3f743e9

Please sign in to comment.