]> www.infradead.org Git - users/jedix/linux-maple.git/commit
io_uring/rsrc: avoid NULL check in io_put_rsrc_node()
authorCaleb Sander Mateos <csander@purestorage.com>
Sun, 16 Feb 2025 22:58:59 +0000 (15:58 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 17 Feb 2025 12:34:46 +0000 (05:34 -0700)
commit496f56bf9f1acf11ce14489f34d81ba6e4023f42
treef8da87b2b602e4d6a2badcd345dc0b4ac1402fb3
parent60e6ce746bfcbe7541c205085c11ce0ff2ffd014
io_uring/rsrc: avoid NULL check in io_put_rsrc_node()

Most callers of io_put_rsrc_node() already check that node is non-NULL:
- io_rsrc_data_free()
- io_sqe_buffer_register()
- io_reset_rsrc_node()
- io_req_put_rsrc_nodes() (REQ_F_BUF_NODE indicates non-NULL buf_node)

Only io_splice_cleanup() can call io_put_rsrc_node() with a NULL node.
So move the NULL check there.

Signed-off-by: Caleb Sander Mateos <csander@purestorage.com>
Link: https://lore.kernel.org/r/20250216225900.1075446-1-csander@purestorage.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/rsrc.h
io_uring/splice.c