From: Jens Axboe <axboe@kernel.dk>
To: io-uring@vger.kernel.org
Cc: Jens Axboe <axboe@kernel.dk>
Subject: [PATCH 1/2] io_uring/kbuf: kill dead struct io_buffer_list 'nr_entries' member
Date: Tue, 28 Apr 2026 09:44:49 -0600 [thread overview]
Message-ID: <20260428154557.2150818-2-axboe@kernel.dk> (raw)
In-Reply-To: <20260428154557.2150818-1-axboe@kernel.dk>
This is only ever assigned, never used. The only used part is the
calculated mask, which is used for indexing. Kill 'nr_entries'.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
---
io_uring/kbuf.c | 1 -
io_uring/kbuf.h | 1 -
2 files changed, 2 deletions(-)
diff --git a/io_uring/kbuf.c b/io_uring/kbuf.c
index 8da2ff798170..43e4f8615fe8 100644
--- a/io_uring/kbuf.c
+++ b/io_uring/kbuf.c
@@ -680,7 +680,6 @@ int io_register_pbuf_ring(struct io_ring_ctx *ctx, void __user *arg)
}
#endif
- bl->nr_entries = reg.ring_entries;
bl->mask = reg.ring_entries - 1;
bl->flags |= IOBL_BUF_RING;
bl->buf_ring = br;
diff --git a/io_uring/kbuf.h b/io_uring/kbuf.h
index bf15e26520d3..abf7052b556e 100644
--- a/io_uring/kbuf.h
+++ b/io_uring/kbuf.h
@@ -27,7 +27,6 @@ struct io_buffer_list {
__u16 bgid;
/* below is for ring provided buffers */
- __u16 nr_entries;
__u16 head;
__u16 mask;
--
2.53.0
next prev parent reply other threads:[~2026-04-28 15:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-28 15:44 [PATCHSET 0/2] kbuf fixes Jens Axboe
2026-04-28 15:44 ` Jens Axboe [this message]
2026-04-28 17:54 ` [PATCH 1/2] io_uring/kbuf: kill dead struct io_buffer_list 'nr_entries' member Gabriel Krisman Bertazi
2026-04-28 15:44 ` [PATCH 2/2] io_uring/kbuf: support min length left for incremental buffers Jens Axboe
2026-04-28 17:53 ` Gabriel Krisman Bertazi
2026-04-28 18:02 ` Jens Axboe
2026-04-28 19:08 ` Gabriel Krisman Bertazi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260428154557.2150818-2-axboe@kernel.dk \
--to=axboe@kernel.dk \
--cc=io-uring@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox