Commit bf931be5 authored by Caleb Sander Mateos's avatar Caleb Sander Mateos Committed by Jens Axboe
Browse files

io_uring/rsrc: declare io_find_buf_node() in header file



Declare io_find_buf_node() in io_uring/rsrc.h so it can be called from
other files.

Signed-off-by: default avatarCaleb Sander Mateos <csander@purestorage.com>
Link: https://lore.kernel.org/r/20250301001610.678223-1-csander@purestorage.com


[axboe: keep the inline for local hot path usage]
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent e6ea7ec4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1074,7 +1074,7 @@ static int io_import_fixed(int ddir, struct iov_iter *iter,
	return 0;
}

static inline struct io_rsrc_node *io_find_buf_node(struct io_kiocb *req,
inline struct io_rsrc_node *io_find_buf_node(struct io_kiocb *req,
					     unsigned issue_flags)
{
	struct io_ring_ctx *ctx = req->ctx;
+2 −0
Original line number Diff line number Diff line
@@ -55,6 +55,8 @@ void io_free_rsrc_node(struct io_ring_ctx *ctx, struct io_rsrc_node *node);
void io_rsrc_data_free(struct io_ring_ctx *ctx, struct io_rsrc_data *data);
int io_rsrc_data_alloc(struct io_rsrc_data *data, unsigned nr);

struct io_rsrc_node *io_find_buf_node(struct io_kiocb *req,
				      unsigned issue_flags);
int io_import_reg_buf(struct io_kiocb *req, struct iov_iter *iter,
			u64 buf_addr, size_t len, int ddir,
			unsigned issue_flags);