Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 21498223 authored by Matthew Wilcox's avatar Matthew Wilcox Committed by Matthew Wilcox
Browse files

perfmon: Use task_is_*

parent 92a1f4bc
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -2631,7 +2631,7 @@ pfm_task_incompatible(pfm_context_t *ctx, struct task_struct *task)
	 */
	 */
	if (task == current) return 0;
	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));
		DPRINT(("cannot attach to non-stopped task [%d] state=%ld\n", task_pid_nr(task), task->state));
		return -EBUSY;
		return -EBUSY;
	}
	}
@@ -4792,7 +4792,7 @@ recheck:
	 * the task must be stopped.
	 * the task must be stopped.
	 */
	 */
	if (PFM_CMD_STOPPED(cmd)) {
	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)));
			DPRINT(("[%d] task not in stopped state\n", task_pid_nr(task)));
			return -EBUSY;
			return -EBUSY;
		}
		}