io_uring: cleanup 'ret' handling in io_iopoll_check()
authorJens Axboe <axboe@kernel.dk>
Wed, 9 Aug 2023 16:03:00 +0000 (10:03 -0600)
committerJens Axboe <axboe@kernel.dk>
Wed, 9 Aug 2023 16:46:46 +0000 (10:46 -0600)
commit9e4bef2ba9e0c5fd0e0ae383f0c0fb0e338aafad
treed268ad31ca6d9ad5dabdf90d0b92d70a1728903c
parentdc314886cb3d0e4ab2858003e8de2917f8a3ccbd
io_uring: cleanup 'ret' handling in io_iopoll_check()

We return 0 for success, or -error when there's an error. Move the 'ret'
variable into the loop where we are actually using it, to make it
clearer that we don't carry this variable forward for return outside of
the loop.

While at it, also move the need_resched() break condition out of the
while check itself, keeping it with the signal pending check.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/io_uring.c