Commit 4014d943 authored by Jens Axboe's avatar Jens Axboe

io_uring/io-wq: kill off now unused IO_WQ_WORK_NO_CANCEL

It's no longer used as IORING_OP_CLOSE got rid for the need of flagging
it as uncancelable, kill it of.
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 9eac1904
...@@ -944,7 +944,6 @@ static bool io_wq_worker_cancel(struct io_worker *worker, void *data) ...@@ -944,7 +944,6 @@ static bool io_wq_worker_cancel(struct io_worker *worker, void *data)
*/ */
spin_lock_irqsave(&worker->lock, flags); spin_lock_irqsave(&worker->lock, flags);
if (worker->cur_work && if (worker->cur_work &&
!(worker->cur_work->flags & IO_WQ_WORK_NO_CANCEL) &&
match->fn(worker->cur_work, match->data)) { match->fn(worker->cur_work, match->data)) {
send_sig(SIGINT, worker->task, 1); send_sig(SIGINT, worker->task, 1);
match->nr_running++; match->nr_running++;
......
...@@ -9,7 +9,6 @@ enum { ...@@ -9,7 +9,6 @@ enum {
IO_WQ_WORK_CANCEL = 1, IO_WQ_WORK_CANCEL = 1,
IO_WQ_WORK_HASHED = 2, IO_WQ_WORK_HASHED = 2,
IO_WQ_WORK_UNBOUND = 4, IO_WQ_WORK_UNBOUND = 4,
IO_WQ_WORK_NO_CANCEL = 8,
IO_WQ_WORK_CONCURRENT = 16, IO_WQ_WORK_CONCURRENT = 16,
IO_WQ_WORK_FILES = 32, IO_WQ_WORK_FILES = 32,
......
...@@ -6386,11 +6386,8 @@ static struct io_wq_work *io_wq_submit_work(struct io_wq_work *work) ...@@ -6386,11 +6386,8 @@ static struct io_wq_work *io_wq_submit_work(struct io_wq_work *work)
if (timeout) if (timeout)
io_queue_linked_timeout(timeout); io_queue_linked_timeout(timeout);
/* if NO_CANCEL is set, we must still run the work */ if (work->flags & IO_WQ_WORK_CANCEL)
if ((work->flags & (IO_WQ_WORK_CANCEL|IO_WQ_WORK_NO_CANCEL)) ==
IO_WQ_WORK_CANCEL) {
ret = -ECANCELED; ret = -ECANCELED;
}
if (!ret) { if (!ret) {
do { do {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment