1 From 3b80cff5a4d117c53d38ce805823084eaeffbde6 Mon Sep 17 00:00:00 2001
2 From: Jens Axboe <axboe@kernel.dk>
3 Date: Thu, 14 Mar 2024 10:46:40 -0600
4 Subject: io_uring/kbuf: get rid of bl->is_ready
6 From: Jens Axboe <axboe@kernel.dk>
8 commit 3b80cff5a4d117c53d38ce805823084eaeffbde6 upstream.
10 Now that xarray is being exclusively used for the buffer_list lookup,
11 this check is no longer needed. Get rid of it and the is_ready member.
13 Cc: stable@vger.kernel.org # v6.4+
14 Signed-off-by: Jens Axboe <axboe@kernel.dk>
15 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
17 io_uring/kbuf.c | 8 --------
18 io_uring/kbuf.h | 2 --
19 2 files changed, 10 deletions(-)
23 @@ -59,7 +59,6 @@ static int io_buffer_add_list(struct io_
24 * always under the ->uring_lock, but the RCU lookup from mmap does.
27 - smp_store_release(&bl->is_ready, 1);
28 return xa_err(xa_store(&ctx->io_bl_xa, bgid, bl, GFP_KERNEL));
31 @@ -691,13 +690,6 @@ void *io_pbuf_get_address(struct io_ring
33 if (!bl || !bl->is_mmap)
36 - * Ensure the list is fully setup. Only strictly needed for RCU lookup
37 - * via mmap, and in that case only for the array indexed groups. For
38 - * the xarray lookups, it's either visible and ready, or not at all.
40 - if (!smp_load_acquire(&bl->is_ready))
47 @@ -29,8 +29,6 @@ struct io_buffer_list {
49 /* ring mapped provided buffers, but mmap'ed by application */
51 - /* bl is visible from an RCU point of view for lookup */