diff options
| author | Pavel Begunkov <asml.silence@gmail.com> | 2025-03-31 17:18:02 +0100 | 
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2025-04-21 05:06:58 -0600 | 
| commit | bd32923e5f02fa7b04d487ec265dc8080d27a257 (patch) | |
| tree | 0ade5ba2b5b7499cad28e50fb70be8736f219e68 /io_uring/kbuf.h | |
| parent | c0e965052149c883317774711205456d08285741 (diff) | |
io_uring: don't store bgid in req->buf_index
Pass buffer group id into the rest of helpers via struct buf_sel_arg
and remove all reassignments of req->buf_index back to bgid. Now, it
only stores buffer indexes, and the group is provided by callers.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/3ea9fa08113ecb4d9224b943e7806e80a324bdf9.1743437358.git.asml.silence@gmail.com
Link: https://lore.kernel.org/io-uring/0c01d76ff12986c2f48614db8610caff8f78c869.1743500909.git.asml.silence@gmail.com/
[axboe: fold in patch from second link]
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, 1 insertions, 1 deletions
| diff --git a/io_uring/kbuf.h b/io_uring/kbuf.h index 09129115f3ef..0798a732e6cb 100644 --- a/io_uring/kbuf.h +++ b/io_uring/kbuf.h @@ -55,6 +55,7 @@ struct buf_sel_arg {  	size_t max_len;  	unsigned short nr_iovs;  	unsigned short mode; +	unsigned buf_group;  };  void __user *io_buffer_select(struct io_kiocb *req, size_t *len, @@ -94,7 +95,6 @@ static inline bool io_kbuf_recycle_ring(struct io_kiocb *req)  	 * to monopolize the buffer.  	 */  	if (req->buf_list) { -		req->buf_index = req->buf_list->bgid;  		req->flags &= ~(REQ_F_BUFFER_RING|REQ_F_BUFFERS_COMMIT);  		return true;  	} | 
