summaryrefslogtreecommitdiff
path: root/io_uring
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2024-03-14 10:46:40 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-04-10 16:36:02 +0200
commit4c0a5da0e70e7055311a8a949b9759811fa7656d (patch)
treeadf363cdbee88caed2c4edb964f3f39c2e3d7b65 /io_uring
parentd6e03f6d8bcce48c181a4177ec19a9ddb8b20e67 (diff)
downloadlinux-riscv-4c0a5da0e70e7055311a8a949b9759811fa7656d.tar.gz
linux-riscv-4c0a5da0e70e7055311a8a949b9759811fa7656d.tar.bz2
linux-riscv-4c0a5da0e70e7055311a8a949b9759811fa7656d.zip
io_uring/kbuf: get rid of bl->is_ready
commit 3b80cff5a4d117c53d38ce805823084eaeffbde6 upstream. Now that xarray is being exclusively used for the buffer_list lookup, this check is no longer needed. Get rid of it and the is_ready member. Cc: stable@vger.kernel.org # v6.4+ Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'io_uring')
-rw-r--r--io_uring/kbuf.c8
-rw-r--r--io_uring/kbuf.h2
2 files changed, 0 insertions, 10 deletions
diff --git a/io_uring/kbuf.c b/io_uring/kbuf.c
index d2831debd8c9..3dd33d513c41 100644
--- a/io_uring/kbuf.c
+++ b/io_uring/kbuf.c
@@ -59,7 +59,6 @@ static int io_buffer_add_list(struct io_ring_ctx *ctx,
* always under the ->uring_lock, but the RCU lookup from mmap does.
*/
bl->bgid = bgid;
- smp_store_release(&bl->is_ready, 1);
return xa_err(xa_store(&ctx->io_bl_xa, bgid, bl, GFP_KERNEL));
}
@@ -691,13 +690,6 @@ void *io_pbuf_get_address(struct io_ring_ctx *ctx, unsigned long bgid)
if (!bl || !bl->is_mmap)
return NULL;
- /*
- * Ensure the list is fully setup. Only strictly needed for RCU lookup
- * via mmap, and in that case only for the array indexed groups. For
- * the xarray lookups, it's either visible and ready, or not at all.
- */
- if (!smp_load_acquire(&bl->is_ready))
- return NULL;
return bl->buf_ring;
}
diff --git a/io_uring/kbuf.h b/io_uring/kbuf.h
index 3d0cb6b8c1ed..94c030b4090f 100644
--- a/io_uring/kbuf.h
+++ b/io_uring/kbuf.h
@@ -29,8 +29,6 @@ struct io_buffer_list {
__u8 is_mapped;
/* ring mapped provided buffers, but mmap'ed by application */
__u8 is_mmap;
- /* bl is visible from an RCU point of view for lookup */
- __u8 is_ready;
};
struct io_buffer {