io_uring: fix assign file locking issue
authorPavel Begunkov <asml.silence@gmail.com>
Tue, 12 Apr 2022 14:24:43 +0000 (15:24 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 12 Apr 2022 14:39:49 +0000 (08:39 -0600)
commit0f8da75b51ac863b9435368bd50691718cc454b0
treeb0cc3c6152d2f58e796432075eabffe0956a6a7c
parent82733d168cbd3fe9dab603f05894316b99008924
io_uring: fix assign file locking issue

io-wq work cancellation path can't take uring_lock as how it's done on
file assignment, we have to handle IO_WQ_WORK_CANCEL first, this fixes
encountered hangs.

Fixes: 6bf9c47a3989 ("io_uring: defer file assignment")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/0d9b9f37841645518503f6a207e509d14a286aba.1649773463.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c