Skip to content

Commit 3b80cff

Browse files
committed
io_uring/kbuf: get rid of bl->is_ready
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: [email protected] # v6.4+ Signed-off-by: Jens Axboe <[email protected]>
1 parent 09ab7ef commit 3b80cff

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

io_uring/kbuf.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ static int io_buffer_add_list(struct io_ring_ctx *ctx,
6161
* always under the ->uring_lock, but the RCU lookup from mmap does.
6262
*/
6363
bl->bgid = bgid;
64-
smp_store_release(&bl->is_ready, 1);
6564
return xa_err(xa_store(&ctx->io_bl_xa, bgid, bl, GFP_KERNEL));
6665
}
6766

@@ -721,13 +720,6 @@ void *io_pbuf_get_address(struct io_ring_ctx *ctx, unsigned long bgid)
721720

722721
if (!bl || !bl->is_mmap)
723722
return NULL;
724-
/*
725-
* Ensure the list is fully setup. Only strictly needed for RCU lookup
726-
* via mmap, and in that case only for the array indexed groups. For
727-
* the xarray lookups, it's either visible and ready, or not at all.
728-
*/
729-
if (!smp_load_acquire(&bl->is_ready))
730-
return NULL;
731723

732724
return bl->buf_ring;
733725
}

io_uring/kbuf.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ struct io_buffer_list {
2929
__u8 is_buf_ring;
3030
/* ring mapped provided buffers, but mmap'ed by application */
3131
__u8 is_mmap;
32-
/* bl is visible from an RCU point of view for lookup */
33-
__u8 is_ready;
3432
};
3533

3634
struct io_buffer {

0 commit comments

Comments
 (0)