Blob Blame History Raw
From a141dd896f544df9627502cfb3fc1a73fb6587e4 Mon Sep 17 00:00:00 2001
From: Jens Axboe <axboe@kernel.dk>
Date: Thu, 12 Aug 2021 12:48:34 -0600
Subject: [PATCH] io_uring: correct __must_hold annotation
Git-commit: a141dd896f544df9627502cfb3fc1a73fb6587e4
Patch-mainline: v5.15-rc1
References: git-fixes

io_req_free_batch() has a __must_hold annotation referencing a
request being passed in, but we're passing in the context.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Gabriel Krisman Bertazi <krisman@suse.de>
---
 fs/io_uring.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/io_uring.c b/fs/io_uring.c
index c581c7cbb8b2..e1ca427e183a 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -2182,7 +2182,7 @@ static void io_req_free_batch(struct req_batch *rb, struct io_kiocb *req,
 }
 
 static void io_submit_flush_completions(struct io_ring_ctx *ctx)
-	__must_hold(&req->ctx->uring_lock)
+	__must_hold(&ctx->uring_lock)
 {
 	struct io_submit_state *state = &ctx->submit_state;
 	int i, nr = state->compl_nr;
-- 
2.35.3