io_uring/rsrc: Move lockdep assert from io_free_rsrc_node() to caller for-6.14/io_uring-post
authorJann Horn <jannh@google.com>
Mon, 20 Jan 2025 16:21:57 +0000 (17:21 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 20 Jan 2025 16:39:26 +0000 (09:39 -0700)
commit8c4b2fd5908d2260dfac8d4b74aae1bb5deea379
tree3b18a508152f7b2d411d0ffcaa12754e5c5c7085
parent02c2a59d20ae1424fce4d08d1dd5e61d911ac1fa
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>
io_uring/rsrc.c
io_uring/rsrc.h