io_uring/rsrc: protect node refs with uring_lock
authorPavel Begunkov <asml.silence@gmail.com>
Tue, 4 Apr 2023 12:39:49 +0000 (13:39 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 4 Apr 2023 15:30:39 +0000 (09:30 -0600)
commitef8ae64ffa9578c12e44de42604004c2cc3e9c27
treea9aeabbb02273d7ca7ce7c38eebd96665b100156
parent03adabe81abb20221079b48343783b4327bd1186
io_uring/rsrc: protect node refs with uring_lock

Currently, for nodes we have an atomic counter and some cached
(non-atomic) refs protected by uring_lock. Let's put all ref
manipulations under uring_lock and get rid of the atomic part.
It's free as in all cases we care about we already hold the lock.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/25b142feed7d831008257d90c8b17c0115d4fc15.1680576071.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/io_uring.c
io_uring/rsrc.c
io_uring/rsrc.h