From: Pavel Begunkov <[email protected]>
To: [email protected]
Cc: Jens Axboe <[email protected]>,
[email protected], Ming Lei <[email protected]>
Subject: [PATCH for-next 4/4] io_uring: remove io_req_put_rsrc_locked()
Date: Fri, 5 Apr 2024 16:50:05 +0100 [thread overview]
Message-ID: <a195bc78ac3d2c6fbaea72976e982fe51e50ecdd.1712331455.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>
io_req_put_rsrc_locked() is a weird shim function around
io_req_put_rsrc(). All calls to io_req_put_rsrc() require holding
->uring_lock, so we can just use it directly.
Signed-off-by: Pavel Begunkov <[email protected]>
---
io_uring/io_uring.c | 5 ++---
io_uring/rsrc.h | 6 ------
2 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c
index b20ee6a0e32e..909842cb1436 100644
--- a/io_uring/io_uring.c
+++ b/io_uring/io_uring.c
@@ -1451,10 +1451,9 @@ static void io_free_batch_list(struct io_ring_ctx *ctx,
io_clean_op(req);
}
io_put_file(req);
-
- io_req_put_rsrc_locked(req, ctx);
-
+ io_put_rsrc_node(ctx, req->rsrc_node);
io_put_task(req->task);
+
node = req->comp_list.next;
io_req_add_to_cache(req, ctx);
} while (node);
diff --git a/io_uring/rsrc.h b/io_uring/rsrc.h
index 83c079a707f8..c032ca3436ca 100644
--- a/io_uring/rsrc.h
+++ b/io_uring/rsrc.h
@@ -83,12 +83,6 @@ static inline void io_put_rsrc_node(struct io_ring_ctx *ctx, struct io_rsrc_node
io_rsrc_node_ref_zero(node);
}
-static inline void io_req_put_rsrc_locked(struct io_kiocb *req,
- struct io_ring_ctx *ctx)
-{
- io_put_rsrc_node(ctx, req->rsrc_node);
-}
-
static inline void io_charge_rsrc_node(struct io_ring_ctx *ctx,
struct io_rsrc_node *node)
{
--
2.44.0
next prev parent reply other threads:[~2024-04-05 15:50 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-05 15:50 [PATCH for-next 0/4] clean up io_req_complete_post Pavel Begunkov
2024-04-05 15:50 ` [PATCH for-next 1/4] io_uring: kill dead code in io_req_complete_post Pavel Begunkov
2024-04-05 15:50 ` [PATCH for-next 2/4] io_uring: turn implicit assumptions into a warning Pavel Begunkov
2024-04-06 13:21 ` Ming Lei
2024-04-05 15:50 ` [PATCH for-next 3/4] io_uring: remove async request cache Pavel Begunkov
2024-04-06 13:26 ` Ming Lei
2024-04-05 15:50 ` Pavel Begunkov [this message]
2024-04-06 13:28 ` [PATCH for-next 4/4] io_uring: remove io_req_put_rsrc_locked() Ming Lei
2024-04-06 2:06 ` [PATCH for-next 0/4] clean up io_req_complete_post Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a195bc78ac3d2c6fbaea72976e982fe51e50ecdd.1712331455.git.asml.silence@gmail.com \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox