]> Gentwo Git Trees - linux/.git/commitdiff
io_uring/kbuf: remove obsolete buf_nr_pages and update comments
authorJoanne Koong <joannelkoong@gmail.com>
Thu, 20 Nov 2025 19:15:56 +0000 (11:15 -0800)
committerJens Axboe <axboe@kernel.dk>
Thu, 20 Nov 2025 20:23:05 +0000 (13:23 -0700)
The buf_nr_pages field in io_buffer_list was previously used to
determine whether the buffer list uses ring-provided buffers or classic
provided buffers. This is now determined by checking the IOBL_BUF_RING
flag.

Remove the buf_nr_pages field and update related comments.

Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/linux/io_uring_types.h
io_uring/kbuf.h

index 92780764d5faf4e8525109d17412eae27bd63ea6..e1adb0d20a0af2131c145f3f69efadffb34b47cd 100644 (file)
@@ -327,8 +327,8 @@ struct io_ring_ctx {
 
                /*
                 * Modifications are protected by ->uring_lock and ->mmap_lock.
-                * The flags, buf_pages and buf_nr_pages fields should be stable
-                * once published.
+                * The buffer list's io mapped region should be stable once
+                * published.
                 */
                struct xarray           io_bl_xa;
 
index ada382ff38d7e33f4af4a5d2e98d40f5e7712b15..bf15e26520d385a68df2b11525566e3186b68f55 100644 (file)
@@ -14,8 +14,8 @@ enum {
 
 struct io_buffer_list {
        /*
-        * If ->buf_nr_pages is set, then buf_pages/buf_ring are used. If not,
-        * then these are classic provided buffers and ->buf_list is used.
+        * If the IOBL_BUF_RING flag is set, then buf_ring is used. If not, then
+        * these are classic provided buffers and ->buf_list is used.
         */
        union {
                struct list_head buf_list;
@@ -27,7 +27,6 @@ struct io_buffer_list {
        __u16 bgid;
 
        /* below is for ring provided buffers */
-       __u16 buf_nr_pages;
        __u16 nr_entries;
        __u16 head;
        __u16 mask;