From: Pavel Begunkov <[email protected]>
To: Jens Axboe <[email protected]>, [email protected]
Subject: [PATCH 2/3] io_uring: end waiting before task cancel attempts
Date: Sun, 20 Dec 2020 13:21:44 +0000 [thread overview]
Message-ID: <21b8ea10ae41b0e87957229d226d6ff494c42b64.1608469706.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>
Get rid of TASK_UNINTERRUPTIBLE and waiting with finish_wait before
going for next iteration in __io_uring_task_cancel(), because
__io_uring_files_cancel() doesn't expect that sheduling is disallowed.
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 051461b5bf52..30edf47a8f1a 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -8982,9 +8982,9 @@ void __io_uring_task_cancel(void)
if (inflight != tctx_inflight(tctx))
continue;
schedule();
+ finish_wait(&tctx->wait, &wait);
} while (1);
- finish_wait(&tctx->wait, &wait);
atomic_dec(&tctx->in_idle);
}
--
2.24.0
next prev parent 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 ` [PATCH 1/3] io_uring: always progress task_work on task cancel Pavel Begunkov
2020-12-20 13:21 ` Pavel Begunkov [this message]
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=21b8ea10ae41b0e87957229d226d6ff494c42b64.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