io_uring/kbuf: Allow the full buffer id space for provided buffers
authorGabriel Krisman Bertazi <krisman@suse.de>
Thu, 5 Oct 2023 00:05:30 +0000 (20:05 -0400)
committerJens Axboe <axboe@kernel.dk>
Thu, 5 Oct 2023 14:38:15 +0000 (08:38 -0600)
commitf74c746e476b9dad51448b9a9421aae72b60e25f
tree6030cacd141a53ee447c4a8b56327f540deea9a1
parentab69838e7c75b0edb699c1a8f42752b30333c46f
io_uring/kbuf: Allow the full buffer id space for provided buffers

nbufs tracks the number of buffers and not the last bgid. In 16-bit, we
have 2^16 valid buffers, but the check mistakenly rejects the last
bid. Let's fix it to make the interface consistent with the
documentation.

Fixes: ddf0322db79c ("io_uring: add IORING_OP_PROVIDE_BUFFERS")
Signed-off-by: Gabriel Krisman Bertazi <krisman@suse.de>
Link: https://lore.kernel.org/r/20231005000531.30800-3-krisman@suse.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/kbuf.c