mirror of
https://github.com/torvalds/linux.git
synced 2025-11-01 17:18:25 +02:00
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>
This commit is contained in:
parent
c0d8c0362b
commit
80b3de7da7
1 changed files with 2 additions and 9 deletions
|
|
@ -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 | \
|
||||
|
|
|
|||
Loading…
Reference in a new issue