]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: find and cancel head link async work on files exit
authorJens Axboe <axboe@kernel.dk>
Sun, 16 Aug 2020 15:23:05 +0000 (08:23 -0700)
committerJens Axboe <axboe@kernel.dk>
Sun, 16 Aug 2020 21:36:31 +0000 (14:36 -0700)
commit2f521327c09009e5108f9102ace1d1e84238bcfb
tree12865258c97160581ba36671d77f54ad57df7e0c
parente5f0bf958198ed018c9fdf06e8d307ced9af9c95
io_uring: find and cancel head link async work on files exit

Commit 10d7a30fd178 ("io_uring: enable lookup of links holding inflight files")
only handled 2 out of the three head link cases we have, we also need to
lookup and cancel work that is blocked in io-wq if that work has a link
that's holding a reference to the files structure.

Put the "cancel head links that hold this request pending" logic into
io_attempt_cancel(), which will to through the motions of finding and
canceling head links that hold the current inflight files stable request
pending.

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