diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2025-01-15 15:40:48 +0000 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2025-01-15 08:45:37 -0700 |
commit | bab4b2cca027fbc4effc0ef60615a35bfee96ad0 (patch) | |
tree | 54afb8712ee58e9d673ddd2d9cdee6f758b4b02b /io_uring/uring_cmd.c | |
parent | 53745105efc3a865d07ca4973b12ecb63c977bb7 (diff) |
io_uring: reuse io_should_terminate_tw() for cmds
io_uring_cmd_work() rolled a hard coded version of
io_should_terminate_tw() to avoid conflicts, but now it's time to
converge them.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/8a88dd6e4ed8e6c00c6552af0c20c9de02e458de.1736955455.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/uring_cmd.c')
-rw-r--r-- | io_uring/uring_cmd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/io_uring/uring_cmd.c b/io_uring/uring_cmd.c index d6ff803dbbe1..d235043db21e 100644 --- a/io_uring/uring_cmd.c +++ b/io_uring/uring_cmd.c @@ -105,7 +105,7 @@ static void io_uring_cmd_work(struct io_kiocb *req, struct io_tw_state *ts) struct io_uring_cmd *ioucmd = io_kiocb_to_cmd(req, struct io_uring_cmd); unsigned int flags = IO_URING_F_COMPLETE_DEFER; - if (current->flags & (PF_EXITING | PF_KTHREAD)) + if (io_should_terminate_tw()) flags |= IO_URING_F_TASK_DEAD; /* task_work executor checks the deffered list completion */ |