io_uring/kbuf: return correct iovec count from classic buffer peek io_uring-6.11-20240830
authorJens Axboe <axboe@kernel.dk>
Fri, 30 Aug 2024 16:45:54 +0000 (10:45 -0600)
committerJens Axboe <axboe@kernel.dk>
Fri, 30 Aug 2024 16:45:54 +0000 (10:45 -0600)
commitf274495aea7b15225b3d83837121b22ef96e560c
tree6e1cb0d538867ae422138f9866a9ddc65eb811a0
parent1c47c0d6014c832ad8e2ba04fc2c5b7070d999f7
io_uring/kbuf: return correct iovec count from classic buffer peek

io_provided_buffers_select() returns 0 to indicate success, but it should
be returning 1 to indicate that 1 vec was mapped. This causes peeking
to fail with classic provided buffers, and while that's not a use case
that anyone should use, it should still work correctly.

The end result is that no buffer will be selected, and hence a completion
with '0' as the result will be posted, without a buffer attached.

Fixes: 35c8711c8fc4 ("io_uring/kbuf: add helpers for getting/peeking multiple buffers")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/kbuf.c