]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
commita30f895ad3239f45012e860d4f94c1a388b36d14
tree78252d0a8b081532cbf027d51343e4a0b744c8f8
parent9cb0073b302a6b8a8c1015ff31b2b3ab4900f866
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: 61cf93700fe6 ("io_uring: Convert personality_idr to XArray")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c