Skip to content

Commit 0636042

Browse files
isilenceaxboe
authored andcommitted
io_uring/net: use right helpers for async recycle
We have a helper that checks for whether a request contains anything in ->async_data or not, namely req_has_async_data(). It's better to use it as it might have some extra considerations. Fixes: 43e0bbb ("io_uring: add netmsg cache") Signed-off-by: Pavel Begunkov <[email protected]> Link: https://lore.kernel.org/r/b7414da4e7c3c32c31fc02dfd1355af4ccf4ca5f.1660566179.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <[email protected]>
1 parent 568035b commit 0636042

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

io_uring/net.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ static void io_netmsg_recycle(struct io_kiocb *req, unsigned int issue_flags)
116116
{
117117
struct io_async_msghdr *hdr = req->async_data;
118118

119-
if (!hdr || issue_flags & IO_URING_F_UNLOCKED)
119+
if (!req_has_async_data(req) || issue_flags & IO_URING_F_UNLOCKED)
120120
return;
121121

122122
/* Let normal cleanup path reap it if we fail adding to the cache */

0 commit comments

Comments
 (0)