aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/io_uring.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 89aa8412b5f5..e5008c1b82be 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -1920,6 +1920,10 @@ static int io_sq_thread(void *data)
1920 unuse_mm(cur_mm); 1920 unuse_mm(cur_mm);
1921 mmput(cur_mm); 1921 mmput(cur_mm);
1922 } 1922 }
1923
1924 if (kthread_should_park())
1925 kthread_parkme();
1926
1923 return 0; 1927 return 0;
1924} 1928}
1925 1929
@@ -2054,6 +2058,7 @@ static void io_sq_thread_stop(struct io_ring_ctx *ctx)
2054 if (ctx->sqo_thread) { 2058 if (ctx->sqo_thread) {
2055 ctx->sqo_stop = 1; 2059 ctx->sqo_stop = 1;
2056 mb(); 2060 mb();
2061 kthread_park(ctx->sqo_thread);
2057 kthread_stop(ctx->sqo_thread); 2062 kthread_stop(ctx->sqo_thread);
2058 ctx->sqo_thread = NULL; 2063 ctx->sqo_thread = NULL;
2059 } 2064 }