]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: fix xa_alloc_cycle() error return value check
authorJens Axboe <axboe@kernel.dk>
Fri, 20 Aug 2021 20:53:59 +0000 (14:53 -0600)
committerJens Axboe <axboe@kernel.dk>
Fri, 20 Aug 2021 20:59:58 +0000 (14:59 -0600)
commit8a004894525b4e969b3e7be924aee3fb3f873f4c
tree78252d0a8b081532cbf027d51343e4a0b744c8f8
parentf82cb9f9947c59ba8f6e5b8d06cdc3ab6f0fed7e
io_uring: fix xa_alloc_cycle() error return value check

We currently check for ret != 0 to indicate error, but '1' is a valid
return and just indicates that the allocation succeeded with a wrap.
Correct the check to be for < 0, like it was before the xarray
conversion.

Cc: stable@vger.kernel.org
Fixes: 89dfa9d12ddc ("io_uring: Convert personality_idr to XArray")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c