mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 04:38:03 +00:00
io_uring/net: drop 'kmsg' parameter from io_req_msg_cleanup()
Now that iovec recycling is being done, the iovec is no longer being freed in there. Hence the kmsg parameter is now useless. Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
7519134178
commit
d80f940701
@ -410,7 +410,6 @@ int io_sendmsg_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
|
||||
}
|
||||
|
||||
static void io_req_msg_cleanup(struct io_kiocb *req,
|
||||
struct io_async_msghdr *kmsg,
|
||||
unsigned int issue_flags)
|
||||
{
|
||||
req->flags &= ~REQ_F_NEED_CLEANUP;
|
||||
@ -458,7 +457,7 @@ int io_sendmsg(struct io_kiocb *req, unsigned int issue_flags)
|
||||
ret = -EINTR;
|
||||
req_set_fail(req);
|
||||
}
|
||||
io_req_msg_cleanup(req, kmsg, issue_flags);
|
||||
io_req_msg_cleanup(req, issue_flags);
|
||||
if (ret >= 0)
|
||||
ret += sr->done_io;
|
||||
else if (sr->done_io)
|
||||
@ -512,7 +511,7 @@ int io_send(struct io_kiocb *req, unsigned int issue_flags)
|
||||
ret += sr->done_io;
|
||||
else if (sr->done_io)
|
||||
ret = sr->done_io;
|
||||
io_req_msg_cleanup(req, kmsg, issue_flags);
|
||||
io_req_msg_cleanup(req, issue_flags);
|
||||
io_req_set_res(req, ret, 0);
|
||||
return IOU_OK;
|
||||
}
|
||||
@ -720,7 +719,7 @@ static inline bool io_recv_finish(struct io_kiocb *req, int *ret,
|
||||
*ret = IOU_STOP_MULTISHOT;
|
||||
else
|
||||
*ret = IOU_OK;
|
||||
io_req_msg_cleanup(req, kmsg, issue_flags);
|
||||
io_req_msg_cleanup(req, issue_flags);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1206,7 +1205,7 @@ int io_send_zc(struct io_kiocb *req, unsigned int issue_flags)
|
||||
*/
|
||||
if (!(issue_flags & IO_URING_F_UNLOCKED)) {
|
||||
io_notif_flush(zc->notif);
|
||||
io_req_msg_cleanup(req, kmsg, 0);
|
||||
io_req_msg_cleanup(req, 0);
|
||||
}
|
||||
io_req_set_res(req, ret, IORING_CQE_F_MORE);
|
||||
return IOU_OK;
|
||||
@ -1268,7 +1267,7 @@ int io_sendmsg_zc(struct io_kiocb *req, unsigned int issue_flags)
|
||||
*/
|
||||
if (!(issue_flags & IO_URING_F_UNLOCKED)) {
|
||||
io_notif_flush(sr->notif);
|
||||
io_req_msg_cleanup(req, kmsg, 0);
|
||||
io_req_msg_cleanup(req, 0);
|
||||
}
|
||||
io_req_set_res(req, ret, IORING_CQE_F_MORE);
|
||||
return IOU_OK;
|
||||
|
Loading…
Reference in New Issue
Block a user