]> www.infradead.org Git - users/hch/misc.git/commit
io_uring/rsrc: add & apply io_req_assign_buf_node()
authorMing Lei <ming.lei@redhat.com>
Thu, 7 Nov 2024 11:01:36 +0000 (19:01 +0800)
committerJens Axboe <axboe@kernel.dk>
Thu, 7 Nov 2024 22:24:33 +0000 (15:24 -0700)
commit039c878db7add23c1c9ea18424c442cce76670f9
tree5815f2cce4e7e3667058e68a6f624a39731a4eb3
parent4f219fcce5e4366cc121fc98270beb1fbbb3df2b
io_uring/rsrc: add & apply io_req_assign_buf_node()

The following pattern becomes more and more:

+       io_req_assign_rsrc_node(&req->buf_node, node);
+       req->flags |= REQ_F_BUF_NODE;

so make it a helper, which is less fragile to use than above code, for
example, the BUF_NODE flag is even missed in current io_uring_cmd_prep().

Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20241107110149.890530-4-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/net.c
io_uring/nop.c
io_uring/rsrc.h
io_uring/rw.c
io_uring/uring_cmd.c