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

Commit a2d4c71d authored by Al Viro's avatar Al Viro
Browse files

deal with task_work callbacks adding more work



It doesn't matter on normal return to userland path (we'll recheck the
NOTIFY_RESUME flag anyway), but in case of exit_task_work() we'll
need that as soon as we get callbacks capable of triggering more
task_work_add().

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent ed3e694d
Loading
Loading
Loading
Loading
+14 −12
Original line number Diff line number Diff line
@@ -60,6 +60,7 @@ void task_work_run(void)
	struct task_struct *task = current;
	struct callback_head *p, *q;

	while (1) {
		raw_spin_lock_irq(&task->pi_lock);
		p = task->task_works;
		task->task_works = NULL;
@@ -76,3 +77,4 @@ void task_work_run(void)
			q = p;
		}
	}
}