Skip to content

Commit c5efc6a

Browse files
aloktiwaaxboe
authored andcommitted
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: f110ed8 ("io_uring: split out fixed file installation and removal") Signed-off-by: Alok Tiwari <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 060aa0b commit c5efc6a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

io_uring/filetable.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ void io_free_file_tables(struct io_ring_ctx *ctx, struct io_file_table *table)
5757

5858
static int io_install_fixed_file(struct io_ring_ctx *ctx, struct file *file,
5959
u32 slot_index)
60-
__must_hold(&req->ctx->uring_lock)
60+
__must_hold(&ctx->uring_lock)
6161
{
6262
struct io_rsrc_node *node;
6363

0 commit comments

Comments
 (0)