diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2025-02-26 11:41:15 +0000 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2025-02-27 07:19:01 -0700 |
commit | 80b3de7da7d2525c4a5f20fb7248366d42b4e4fb (patch) | |
tree | 98470202122b06e60f65f168a9dcfa40212024f8 | |
parent | c0d8c0362ba56dd68b45293271e5829ed8c95f5a (diff) |
io_uring/net: remove unnecessary REQ_F_NEED_CLEANUP
REQ_F_NEED_CLEANUP in io_recvmsg_prep_setup() and in io_sendmsg_setup()
are relics of the past and don't do anything useful, the flag should be
and are set earlier on iovec and async_data allocation.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/6aedc3141c1fc027128a4503656cfd686a6980ef.1740569495.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r-- | io_uring/net.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/io_uring/net.c b/io_uring/net.c index bce75d64be92..c78edfd5085e 100644 --- a/io_uring/net.c +++ b/io_uring/net.c @@ -388,14 +388,10 @@ static int io_sendmsg_setup(struct io_kiocb *req, const struct io_uring_sqe *sqe { struct io_sr_msg *sr = io_kiocb_to_cmd(req, struct io_sr_msg); struct io_async_msghdr *kmsg = req->async_data; - int ret; sr->umsg = u64_to_user_ptr(READ_ONCE(sqe->addr)); - ret = io_sendmsg_copy_hdr(req, kmsg); - if (!ret) - req->flags |= REQ_F_NEED_CLEANUP; - return ret; + return io_sendmsg_copy_hdr(req, kmsg); } #define SENDMSG_FLAGS (IORING_RECVSEND_POLL_FIRST | IORING_RECVSEND_BUNDLE) @@ -774,10 +770,7 @@ static int io_recvmsg_prep_setup(struct io_kiocb *req) return 0; } - ret = io_recvmsg_copy_hdr(req, kmsg); - if (!ret) - req->flags |= REQ_F_NEED_CLEANUP; - return ret; + return io_recvmsg_copy_hdr(req, kmsg); } #define RECVMSG_FLAGS (IORING_RECVSEND_POLL_FIRST | IORING_RECV_MULTISHOT | \ |