io_uring: fix cancel of deferred reqs with ->files
authorPavel Begunkov <asml.silence@gmail.com>
Sat, 5 Sep 2020 21:45:14 +0000 (00:45 +0300)
committerJens Axboe <axboe@kernel.dk>
Sat, 5 Sep 2020 21:59:51 +0000 (15:59 -0600)
commitb7ddce3cbf010edbfac6c6d8cc708560a7bcd7a4
tree024015addf58f2ed8c79b89d6c20be7cefc418b6
parentc183edff33fdcd639d222a8f473bf44602adc655
io_uring: fix cancel of deferred reqs with ->files

While trying to cancel requests with ->files, it also should look for
requests in ->defer_list, otherwise it might end up hanging a thread.

Cancel all requests in ->defer_list up to the last request there with
matching ->files, that's needed to follow drain ordering semantics.

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