io_uring: fix warning in io_try_cancel_userdata()
PATCH 1/1 io_uring: fix warning in io_try_cancel_userdata()
task work can run in system-wq, so enhance the warnning in io_try_cancel_userdata() to reflect it.
Reported-by Abaci Robot <[email protected]>
Signed-off-by Hao Xu <[email protected]>
--- fs/io_uring.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/io_uring.c +2 -1
@@ -6294,7 +6294,8 @@ static int io_try_cancel_userdata(struct io_kiocb *req, u64 sqe_addr)struct io_ring_ctx *ctx = req->ctx;int ret; -WARN_ON_ONCE (!io_wq_current_is_worker () && req->task != current); +WARN_ON_ONCE (!io_wq_current_is_worker () && + !(current->flags &PF_WQ_WORKER ) && req->task != current); ret =io_async_cancel_one (req->task->io_uring, sqe_addr, ctx);if (ret != -ENOENT )
Signature · 1 line
2.24.4