io_uring: improve submit_state.ios_left accounting

state->ios_left isn't decremented for requests that don't need a file,
so it might be larger than number of SQEs left. That in some
circumstances makes us to grab more files that is needed so imposing
extra put.
Deaccount one ios_left for each request.

Signed-off-by: Pavel Begunkov <>
Signed-off-by: Jens Axboe <>
1 file changed