task_work: Introduce task_work_pending
[sfrench/cifs-2.6.git] / kernel / task_work.c
index 1698fbe6f0e134ac2a2ab3e9357b44af99c71f83..cc6fccb0e24dbab0f2f245b4d0b9eb431a5ebf12 100644 (file)
@@ -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.