Commit c5efc6a0 authored by Alok Tiwari's avatar Alok Tiwari Committed by Jens Axboe
Browse files

io_uring: correct __must_hold annotation in io_install_fixed_file



The __must_hold annotation references &req->ctx->uring_lock, but req
is not in scope in io_install_fixed_file. This change updates the
annotation to reference the correct ctx->uring_lock.
improving code clarity.

Fixes: f110ed84 ("io_uring: split out fixed file installation and removal")
Signed-off-by: default avatarAlok Tiwari <alok.a.tiwari@oracle.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 060aa0b0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ void io_free_file_tables(struct io_ring_ctx *ctx, struct io_file_table *table)

static int io_install_fixed_file(struct io_ring_ctx *ctx, struct file *file,
				 u32 slot_index)
	__must_hold(&req->ctx->uring_lock)
	__must_hold(&ctx->uring_lock)
{
	struct io_rsrc_node *node;