public inbox for [email protected]
 help / color / mirror / Atom feed
From: Pavel Begunkov <[email protected]>
To: Jens Axboe <[email protected]>, [email protected]
Subject: [PATCH 1/3] io_uring: always progress task_work on task cancel
Date: Sun, 20 Dec 2020 13:21:43 +0000	[thread overview]
Message-ID: <7df05cd5492a204dade1c59d02fbd28b14893ee8.1608469706.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>

Might happen that __io_uring_cancel_task_requests() cancels nothing but
there are task_works pending. We need to always run them.

Signed-off-by: Pavel Begunkov <[email protected]>
---
 fs/io_uring.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/io_uring.c b/fs/io_uring.c
index f3690dfdd564..051461b5bf52 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -8794,9 +8794,9 @@ static void __io_uring_cancel_task_requests(struct io_ring_ctx *ctx,
 
 		ret |= io_poll_remove_all(ctx, task, NULL);
 		ret |= io_kill_timeouts(ctx, task, NULL);
+		ret |= io_run_task_work();
 		if (!ret)
 			break;
-		io_run_task_work();
 		cond_resched();
 	}
 }
-- 
2.24.0


  reply	other threads:[~2020-12-20 13:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-20 13:21 [PATCH 0/3] task/files cancellation fixes Pavel Begunkov
2020-12-20 13:21 ` Pavel Begunkov [this message]
2020-12-20 13:21 ` [PATCH 2/3] io_uring: end waiting before task cancel attempts Pavel Begunkov
2020-12-20 13:21 ` [PATCH 3/3] io_uring: fix cancellation hangs Pavel Begunkov
2020-12-20 18:01 ` [PATCH 0/3] task/files cancellation fixes Pavel Begunkov
2020-12-20 18:05   ` Jens Axboe

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=7df05cd5492a204dade1c59d02fbd28b14893ee8.1608469706.git.asml.silence@gmail.com \
    [email protected] \
    [email protected] \
    [email protected] \
    /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