io_uring/rsrc: remove node assignment helpers
authorJens Axboe <axboe@kernel.dk>
Wed, 16 Apr 2025 19:25:03 +0000 (13:25 -0600)
committerJens Axboe <axboe@kernel.dk>
Mon, 21 Apr 2025 11:06:58 +0000 (05:06 -0600)
commit8a2dacd49f1d19f4e3a4ebc99d11622cafd1659e
treeff0b54219dbc6ca2a331631c8f41ae24aee543d0
parent53db8a71ecb42c2ec5e9c6925269a750255f9af5
io_uring/rsrc: remove node assignment helpers

There are two helpers here, one assigns and increments the node ref
count, and the other is simply a wrapper around that for the buffer node
handling.

The buffer node assignment benefits from checking and setting
REQ_F_BUF_NODE together, otherwise stalls have been observed on setting
that flag later in the process. Hence re-do it so that it's set when
checked, and cleared in case of (unlikely) failure. With that, the
buffer node helper can go, and then drop the generic
io_req_assign_rsrc_node() helper as well as there's only a single user
of it left at that point.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/io_uring.c
io_uring/rsrc.c
io_uring/rsrc.h