Merge tag 'pci-v5.18-changes-2' of git://git.kernel.org/pub/scm/linux/kernel/git...
[sfrench/cifs-2.6.git] / include / linux / task_work.h
index 5b8a93f288bb4d924dcead4cb79b3754e0fecad4..897494b597ba4f488784fd847c1a68752f3a49aa 100644 (file)
@@ -19,6 +19,11 @@ enum task_work_notify_mode {
        TWA_SIGNAL,
 };
 
+static inline bool task_work_pending(struct task_struct *task)
+{
+       return READ_ONCE(task->task_works);
+}
+
 int task_work_add(struct task_struct *task, struct callback_head *twork,
                        enum task_work_notify_mode mode);