diff options
| author | Jann Horn <jannh@google.com> | 2025-01-20 17:21:57 +0100 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2025-01-21 07:07:26 -0700 |
| commit | 2839ab71ac9009884fe41a7422a167a64716c0a7 (patch) | |
| tree | e3f5411b27ed1c1cbf00a034d051562a4cd5acdf /io_uring/rsrc.c | |
| parent | b73de0da50129d790975bb8a9893b421cc38bc24 (diff) | |
| download | linux-2839ab71ac9009884fe41a7422a167a64716c0a7.tar.gz linux-2839ab71ac9009884fe41a7422a167a64716c0a7.tar.bz2 linux-2839ab71ac9009884fe41a7422a167a64716c0a7.zip | |
io_uring/rsrc: Move lockdep assert from io_free_rsrc_node() to caller
Checking for lockdep_assert_held(&ctx->uring_lock) in io_free_rsrc_node()
means that the assertion is only checked when the resource drops to zero
references.
Move the lockdep assertion up into the caller io_put_rsrc_node() so that it
instead happens on every reference count decrement.
Signed-off-by: Jann Horn <jannh@google.com>
Link: https://lore.kernel.org/r/20250120-uring-lockdep-assert-earlier-v1-1-68d8e071a4bb@google.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/rsrc.c')
| -rw-r--r-- | io_uring/rsrc.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/io_uring/rsrc.c b/io_uring/rsrc.c index a5fc035af8ff..af39b69eb4fd 100644 --- a/io_uring/rsrc.c +++ b/io_uring/rsrc.c @@ -444,8 +444,6 @@ int io_files_update(struct io_kiocb *req, unsigned int issue_flags) void io_free_rsrc_node(struct io_ring_ctx *ctx, struct io_rsrc_node *node) { - lockdep_assert_held(&ctx->uring_lock); - if (node->tag) io_post_aux_cqe(ctx, node->tag, 0, 0); |
