浏览代码

power: Use task_is_*

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Matthew Wilcox 17 年之前
父节点
当前提交
d2f60e5faa
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      kernel/power/process.c

+ 3 - 3
kernel/power/process.c

@@ -86,9 +86,9 @@ static void fake_signal_wake_up(struct task_struct *p, int resume)
 
 
 static void send_fake_signal(struct task_struct *p)
 static void send_fake_signal(struct task_struct *p)
 {
 {
-	if (p->state == TASK_STOPPED)
+	if (task_is_stopped(p))
 		force_sig_specific(SIGSTOP, p);
 		force_sig_specific(SIGSTOP, p);
-	fake_signal_wake_up(p, p->state == TASK_STOPPED);
+	fake_signal_wake_up(p, task_is_stopped(p));
 }
 }
 
 
 static int has_mm(struct task_struct *p)
 static int has_mm(struct task_struct *p)
@@ -182,7 +182,7 @@ static int try_to_freeze_tasks(int freeze_user_space)
 			if (frozen(p) || !freezeable(p))
 			if (frozen(p) || !freezeable(p))
 				continue;
 				continue;
 
 
-			if (p->state == TASK_TRACED && frozen(p->parent)) {
+			if (task_is_traced(p) && frozen(p->parent)) {
 				cancel_freezing(p);
 				cancel_freezing(p);
 				continue;
 				continue;
 			}
 			}