[PATCH 05/15] io_uring/kbuf: use io_ring_submit_unlock() helper

Jens Axboe axboe at kernel.dk
Fri Sep 11 08:40:55 PDT 2026


io_buffers_select() open-codes how it unlocks the ring based on the
issue_flags, use the generic helper instead.

Signed-off-by: Jens Axboe <axboe at kernel.dk>
---
 io_uring/kbuf.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/io_uring/kbuf.c b/io_uring/kbuf.c
index 7c309173dd19..8f04e6cc773b 100644
--- a/io_uring/kbuf.c
+++ b/io_uring/kbuf.c
@@ -371,10 +371,9 @@ int io_buffers_select(struct io_kiocb *req, struct buf_sel_arg *arg,
 		ret = io_provided_buffers_select(req, &arg->out_len, sel->buf_list, arg->iovs);
 	}
 out_unlock:
-	if (issue_flags & IO_URING_F_UNLOCKED) {
+	if (issue_flags & IO_URING_F_UNLOCKED)
 		sel->buf_list = NULL;
-		mutex_unlock(&ctx->uring_lock);
-	}
+	io_ring_submit_unlock(ctx, issue_flags);
 	return ret;
 }
 
-- 
2.55.0




More information about the linux-arm-kernel mailing list