projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ebc11b6
)
io_uring: remove unnecessary PF_EXITING check
author
Pavel Begunkov
<asml.silence@gmail.com>
Mon, 9 Aug 2021 12:04:06 +0000
(13:04 +0100)
committer
Jens Axboe
<axboe@kernel.dk>
Mon, 23 Aug 2021 19:07:56 +0000
(13:07 -0600)
We prefer nornal task_works even if it would fail requests inside. Kill
a PF_EXITING check in io_req_task_work_add(), task_work_add() handles
well dying tasks, i.e. return error when can't enqueue due to late
stages of do_exit().
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link:
https://lore.kernel.org/r/fc14297e8441cd8f5d1743a2488cf0df09bf48ac.1628471125.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c
patch
|
blob
|
history
diff --git
a/fs/io_uring.c
b/fs/io_uring.c
index 1a7c91e9891e2033f35bda681d0019035ffaf7d8..620ab4c90dff043d4beb053ea8c2e40726034fba 100644
(file)
--- a/
fs/io_uring.c
+++ b/
fs/io_uring.c
@@
-2006,8
+2006,6
@@
static void io_req_task_work_add(struct io_kiocb *req)
if (test_bit(0, &tctx->task_state) ||
test_and_set_bit(0, &tctx->task_state))
return;
- if (unlikely(tsk->flags & PF_EXITING))
- goto fail;
/*
* SQPOLL kernel thread doesn't need notification, just a wakeup. For
@@
-2020,7
+2018,7
@@
static void io_req_task_work_add(struct io_kiocb *req)
wake_up_process(tsk);
return;
}
-fail:
+
clear_bit(0, &tctx->task_state);
spin_lock_irqsave(&tctx->task_lock, flags);
node = tctx->task_list.first;