PM: remove PF_WQ_WORKER mask
diff mbox series

Message ID 20210125041828.20965-1-qiang.zhang@windriver.com
State Accepted
Commit ccf7ce46ab91515a7146c00300e168efa9dc777e
Headers show
Series
  • PM: remove PF_WQ_WORKER mask
Related show

Commit Message

Zhang, Qiang Jan. 25, 2021, 4:18 a.m. UTC
From: Zqiang <qiang.zhang@windriver.com>

Due to kworker also is kernel thread, it's already included
PF_KTHREAD mask, so remove PF_WQ_WORKER mask.

Signed-off-by: Zqiang <qiang.zhang@windriver.com>
---
 kernel/power/process.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Rafael J. Wysocki Jan. 27, 2021, 6:16 p.m. UTC | #1
On Mon, Jan 25, 2021 at 5:01 AM <qiang.zhang@windriver.com> wrote:
>
> From: Zqiang <qiang.zhang@windriver.com>
>
> Due to kworker also is kernel thread, it's already included
> PF_KTHREAD mask, so remove PF_WQ_WORKER mask.

So you are saying that all threads having PF_WQ_WORKER set must also
have PF_KTHREAD set, right?

That sounds correct, so I'm going to rewrite the changelog and apply
the patch as 5.12 material, thanks!

> Signed-off-by: Zqiang <qiang.zhang@windriver.com>
> ---
>  kernel/power/process.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/power/process.c b/kernel/power/process.c
> index 45b054b7b5ec..50cc63534486 100644
> --- a/kernel/power/process.c
> +++ b/kernel/power/process.c
> @@ -235,7 +235,7 @@ void thaw_kernel_threads(void)
>
>         read_lock(&tasklist_lock);
>         for_each_process_thread(g, p) {
> -               if (p->flags & (PF_KTHREAD | PF_WQ_WORKER))
> +               if (p->flags & PF_KTHREAD)
>                         __thaw_task(p);
>         }
>         read_unlock(&tasklist_lock);
> --
> 2.17.1
>

Patch
diff mbox series

diff --git a/kernel/power/process.c b/kernel/power/process.c
index 45b054b7b5ec..50cc63534486 100644
--- a/kernel/power/process.c
+++ b/kernel/power/process.c
@@ -235,7 +235,7 @@  void thaw_kernel_threads(void)
 
 	read_lock(&tasklist_lock);
 	for_each_process_thread(g, p) {
-		if (p->flags & (PF_KTHREAD | PF_WQ_WORKER))
+		if (p->flags & PF_KTHREAD)
 			__thaw_task(p);
 	}
 	read_unlock(&tasklist_lock);