Merge tag 'for-5.18/io_uring-2022-04-01' of git://git.kernel.dk/linux-block
[linux-2.6-microblaze.git] / kernel / task_work.c
index 1698fbe..c59e1a4 100644 (file)
@@ -1,7 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0
 #include <linux/spinlock.h>
 #include <linux/task_work.h>
-#include <linux/tracehook.h>
+#include <linux/resume_user_mode.h>
 
 static struct callback_head work_exited; /* all we need is ->next == NULL */
 
@@ -78,7 +78,7 @@ task_work_cancel_match(struct task_struct *task,
        struct callback_head *work;
        unsigned long flags;
 
-       if (likely(!task->task_works))
+       if (likely(!task_work_pending(task)))
                return NULL;
        /*
         * If cmpxchg() fails we continue without updating pprev.