perfmon: Use task_is_*
authorMatthew Wilcox <matthew@wil.cx>
Thu, 6 Dec 2007 16:02:55 +0000 (11:02 -0500)
committerMatthew Wilcox <willy@linux.intel.com>
Thu, 6 Dec 2007 22:20:22 +0000 (17:20 -0500)
Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
arch/ia64/kernel/perfmon.c

index 73e7c2e40b54713e69566772b79d3b92fc44a7da..5ae177f557d884dfe75607f6bc55cfb2fe3657a0 100644 (file)
@@ -2631,7 +2631,7 @@ pfm_task_incompatible(pfm_context_t *ctx, struct task_struct *task)
         */
        if (task == current) return 0;
 
-       if ((task->state != TASK_STOPPED) && (task->state != TASK_TRACED)) {
+       if (!task_is_stopped_or_traced(task)) {
                DPRINT(("cannot attach to non-stopped task [%d] state=%ld\n", task_pid_nr(task), task->state));
                return -EBUSY;
        }
@@ -4792,7 +4792,7 @@ recheck:
         * the task must be stopped.
         */
        if (PFM_CMD_STOPPED(cmd)) {
-               if ((task->state != TASK_STOPPED) && (task->state != TASK_TRACED)) {
+               if (!task_is_stopped_or_traced(task)) {
                        DPRINT(("[%d] task not in stopped state\n", task_pid_nr(task)));
                        return -EBUSY;
                }