diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/task_work.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/task_work.c b/kernel/task_work.c index 65bd3c92d6f3..6ee09856f725 100644 --- a/kernel/task_work.c +++ b/kernel/task_work.c | |||
@@ -25,7 +25,7 @@ struct callback_head * | |||
25 | task_work_cancel(struct task_struct *task, task_work_func_t func) | 25 | task_work_cancel(struct task_struct *task, task_work_func_t func) |
26 | { | 26 | { |
27 | struct callback_head **pprev = &task->task_works; | 27 | struct callback_head **pprev = &task->task_works; |
28 | struct callback_head *work = NULL; | 28 | struct callback_head *work; |
29 | unsigned long flags; | 29 | unsigned long flags; |
30 | /* | 30 | /* |
31 | * If cmpxchg() fails we continue without updating pprev. | 31 | * If cmpxchg() fails we continue without updating pprev. |
@@ -35,7 +35,7 @@ task_work_cancel(struct task_struct *task, task_work_func_t func) | |||
35 | */ | 35 | */ |
36 | raw_spin_lock_irqsave(&task->pi_lock, flags); | 36 | raw_spin_lock_irqsave(&task->pi_lock, flags); |
37 | while ((work = ACCESS_ONCE(*pprev))) { | 37 | while ((work = ACCESS_ONCE(*pprev))) { |
38 | read_barrier_depends(); | 38 | smp_read_barrier_depends(); |
39 | if (work->func != func) | 39 | if (work->func != func) |
40 | pprev = &work->next; | 40 | pprev = &work->next; |
41 | else if (cmpxchg(pprev, work, work->next) == work) | 41 | else if (cmpxchg(pprev, work, work->next) == work) |