]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: simplify file ref tracking in submission state
authorPavel Begunkov <asml.silence@gmail.com>
Thu, 16 Jul 2020 20:28:33 +0000 (23:28 +0300)
committerJens Axboe <axboe@kernel.dk>
Fri, 24 Jul 2020 19:00:44 +0000 (13:00 -0600)
commit945482af0b4695573abf081444784b5ce2144fa4
tree39ced7885ecf8b833c3cbe5572203f96e04c44e5
parent06f1bd09169f5ea672c1aa308d7802556210aa6c
io_uring: simplify file ref tracking in submission state

Currently, file refs in struct io_submit_state are tracked with 2 vars:
@has_refs -- how many refs were initially taken
@used_refs -- number of refs used

Replace it with a single variable counting how many refs left at the
current moment.

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