]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
io_uring: correct __must_hold annotation in io_install_fixed_file
authorAlok Tiwari <alok.a.tiwari@oracle.com>
Thu, 23 Oct 2025 11:55:24 +0000 (04:55 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Oct 2025 13:08:59 +0000 (14:08 +0100)
[ Upstream commit c5efc6a0b3940381d67887302ddb87a5cf623685 ]

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: f110ed8498af ("io_uring: split out fixed file installation and removal")
Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
io_uring/filetable.c

index 997c56d32ee6c9ef6674bb2f90a47ea2407259b4..6183d61c7222d2322f52a040b2fd7a01d6db98fe 100644 (file)
@@ -62,7 +62,7 @@ void io_free_file_tables(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_fixed_file *file_slot;
        int ret;