diff options
| author | Yang Yingliang <yangyingliang@huawei.com> | 2021-07-15 21:18:25 +0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-07-19 09:45:02 +0200 |
| commit | 090588059c30ef1b49b82da96bfaead8f430c48e (patch) | |
| tree | d4d3d8f94f1726e9ef790989c36dfe7b270ed0f1 | |
| parent | aa57b2d6b37e3630116e39f0f2acc8da0de6faf5 (diff) | |
| download | linux-090588059c30ef1b49b82da96bfaead8f430c48e.tar.gz linux-090588059c30ef1b49b82da96bfaead8f430c48e.tar.bz2 linux-090588059c30ef1b49b82da96bfaead8f430c48e.zip | |
io_uring: fix clear IORING_SETUP_R_DISABLED in wrong function
In commit 3ebba796fa25 ("io_uring: ensure that SQPOLL thread is started for exit"),
the IORING_SETUP_R_DISABLED is cleared in io_sq_offload_start(), but when backport
it to stable-5.10, IORING_SETUP_R_DISABLED is cleared in __io_req_task_submit(),
move clearing IORING_SETUP_R_DISABLED to io_sq_offload_start() to fix this.
Fixes: 6cae8095490ca ("io_uring: ensure that SQPOLL thread is started for exit")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | fs/io_uring.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c index fb63cc8f476d..42153106b7bc 100644 --- a/fs/io_uring.c +++ b/fs/io_uring.c @@ -2087,7 +2087,6 @@ static void __io_req_task_submit(struct io_kiocb *req) __io_req_task_cancel(req, -EFAULT); mutex_unlock(&ctx->uring_lock); - ctx->flags &= ~IORING_SETUP_R_DISABLED; if (ctx->flags & IORING_SETUP_SQPOLL) io_sq_thread_drop_mm(); } @@ -7992,6 +7991,7 @@ static void io_sq_offload_start(struct io_ring_ctx *ctx) { struct io_sq_data *sqd = ctx->sq_data; + ctx->flags &= ~IORING_SETUP_R_DISABLED; if ((ctx->flags & IORING_SETUP_SQPOLL) && sqd->thread) wake_up_process(sqd->thread); } |
