io_uring: fix miscounting ios_left
authorPavel Begunkov <asml.silence@gmail.com>
Fri, 20 Nov 2020 15:50:51 +0000 (15:50 +0000)
committerJens Axboe <axboe@kernel.dk>
Wed, 9 Dec 2020 19:04:01 +0000 (12:04 -0700)
commitbd5bbda72f7fa013ddea0ff7c4d91daedb821869
tree0015681228d97bacae9546fa04257b0f7eda2b83
parent6e1271e60c1d5e822fd1a32a56d52d9ae1823e62
io_uring: fix miscounting ios_left

io_req_init() doesn't decrement state->ios_left if a request doesn't
need ->file, it just returns before that on if(!needs_file). That's
not really a problem but may cause overhead for an additional fput().
Also inline and kill io_req_set_file() as it's of no use anymore.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c