stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Begunkov <asml.silence@gmail.com>
To: stable@vger.kernel.org
Cc: Jens Axboe <axboe@kernel.dk>
Subject: [PATCH 7/9] io_uring/io-wq: kill off now unused IO_WQ_WORK_NO_CANCEL
Date: Wed, 10 Mar 2021 11:30:43 +0000	[thread overview]
Message-ID: <0a53f04021951888af40f5e487d593c4ac39b244.1615375332.git.asml.silence@gmail.com> (raw)
In-Reply-To: <cover.1615375332.git.asml.silence@gmail.com>

From: Jens Axboe <axboe@kernel.dk>

commit 4014d943cb62db892eb023d385a966a3fce5ee4c upstream

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: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
---
 fs/io-wq.c    | 1 -
 fs/io-wq.h    | 1 -
 fs/io_uring.c | 5 +----
 3 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/fs/io-wq.c b/fs/io-wq.c
index a564f36e260c..2e2f14f42bf2 100644
--- a/fs/io-wq.c
+++ b/fs/io-wq.c
@@ -944,7 +944,6 @@ static bool io_wq_worker_cancel(struct io_worker *worker, void *data)
 	 */
 	spin_lock_irqsave(&worker->lock, flags);
 	if (worker->cur_work &&
-	    !(worker->cur_work->flags & IO_WQ_WORK_NO_CANCEL) &&
 	    match->fn(worker->cur_work, match->data)) {
 		send_sig(SIGINT, worker->task, 1);
 		match->nr_running++;
diff --git a/fs/io-wq.h b/fs/io-wq.h
index b158f8addcf3..e1ffb80a4a1d 100644
--- a/fs/io-wq.h
+++ b/fs/io-wq.h
@@ -9,7 +9,6 @@ enum {
 	IO_WQ_WORK_CANCEL	= 1,
 	IO_WQ_WORK_HASHED	= 2,
 	IO_WQ_WORK_UNBOUND	= 4,
-	IO_WQ_WORK_NO_CANCEL	= 8,
 	IO_WQ_WORK_CONCURRENT	= 16,
 
 	IO_WQ_WORK_FILES	= 32,
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 7d03689d0e47..5ebc05f41c19 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -6388,11 +6388,8 @@ static struct io_wq_work *io_wq_submit_work(struct io_wq_work *work)
 	if (timeout)
 		io_queue_linked_timeout(timeout);
 
-	/* if NO_CANCEL is set, we must still run the work */
-	if ((work->flags & (IO_WQ_WORK_CANCEL|IO_WQ_WORK_NO_CANCEL)) ==
-				IO_WQ_WORK_CANCEL) {
+	if (work->flags & IO_WQ_WORK_CANCEL)
 		ret = -ECANCELED;
-	}
 
 	if (!ret) {
 		do {
-- 
2.24.0


  parent reply	other threads:[~2021-03-10 11:37 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-10 11:30 [PATCH stable-5.11 0/9] stable-5.11 backports Pavel Begunkov
2021-03-10 11:30 ` [PATCH 1/9] io_uring: fix inconsistent lock state Pavel Begunkov
2021-03-10 11:30 ` [PATCH 2/9] io_uring: deduplicate core cancellations sequence Pavel Begunkov
2021-03-10 11:30 ` [PATCH 3/9] io_uring: unpark SQPOLL thread for cancelation Pavel Begunkov
2021-03-10 11:30 ` [PATCH 4/9] io_uring: deduplicate failing task_work_add Pavel Begunkov
2021-03-10 11:30 ` [PATCH 5/9] fs: provide locked helper variant of close_fd_get_file() Pavel Begunkov
2021-03-10 11:30 ` [PATCH 6/9] io_uring: get rid of intermediate IORING_OP_CLOSE stage Pavel Begunkov
2021-03-10 11:30 ` Pavel Begunkov [this message]
2021-03-10 11:30 ` [PATCH 8/9] io_uring/io-wq: return 2-step work swap scheme Pavel Begunkov
2021-03-10 11:30 ` [PATCH 9/9] io_uring: don't take uring_lock during iowq cancel Pavel Begunkov
2021-03-10 11:41 ` [PATCH stable-5.11 0/9] stable-5.11 backports Pavel Begunkov
2021-03-10 12:04 ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0a53f04021951888af40f5e487d593c4ac39b244.1615375332.git.asml.silence@gmail.com \
    --to=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).