io_uring/net: drop 'kmsg' parameter from io_req_msg_cleanup()
authorJens Axboe <axboe@kernel.dk>
Mon, 18 Mar 2024 19:52:42 +0000 (13:52 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 15 Apr 2024 14:10:25 +0000 (08:10 -0600)
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>
io_uring/net.c

index 2727b67f6a72f731134b237970224985a0e50040..1e1d77321fcec4ed5e768f09e84608e50213a180 100644 (file)
@@ -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;