diff options
author | Jens Axboe <axboe@kernel.dk> | 2024-03-15 23:12:51 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-04-03 03:03:26 +0200 |
commit | 6b69c4ab4f685327d9e10caf0d84217ba23a8c4b (patch) | |
tree | 23d7e9bba95a9bf4af42b3f46d1e428fb470b7e5 /io_uring/kbuf.h | |
parent | io_uring/kbuf: get rid of bl->is_ready (diff) | |
download | linux-6b69c4ab4f685327d9e10caf0d84217ba23a8c4b.tar.xz linux-6b69c4ab4f685327d9e10caf0d84217ba23a8c4b.zip |
io_uring/kbuf: protect io_buffer_list teardown with a reference
No functional changes in this patch, just in preparation for being able
to keep the buffer list alive outside of the ctx->uring_lock.
Cc: stable@vger.kernel.org # v6.4+
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/kbuf.h')
-rw-r--r-- | io_uring/kbuf.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/io_uring/kbuf.h b/io_uring/kbuf.h index fdbb10449513..8b868a1744e2 100644 --- a/io_uring/kbuf.h +++ b/io_uring/kbuf.h @@ -25,6 +25,8 @@ struct io_buffer_list { __u16 head; __u16 mask; + atomic_t refs; + /* ring mapped provided buffers */ __u8 is_buf_ring; /* ring mapped provided buffers, but mmap'ed by application */ |