ACCESS_ONCE doesn't work reliably on non-scalar types. This patch removes
the rest of the existing usages of ACCESS_ONCE in the scheduler, and use
the new READ_ONCE and WRITE_ONCE APIs.
Signed-off-by: Jason Low<jason.low2@xxxxxx>
---
include/linux/sched.h | 4 ++--
kernel/fork.c | 2 +-
kernel/sched/auto_group.c | 2 +-
kernel/sched/auto_group.h | 2 +-
kernel/sched/core.c | 4 ++--
kernel/sched/cputime.c | 2 +-
kernel/sched/deadline.c | 2 +-
kernel/sched/fair.c | 14 +++++++-------
kernel/sched/proc.c | 4 ++--
kernel/sched/rt.c | 2 +-
kernel/sched/sched.h | 2 +-
kernel/sched/wait.c | 4 ++--
kernel/time/posix-cpu-timers.c | 8 ++++----
13 files changed, 26 insertions(+), 26 deletions(-)
...
goto no_join;
@@ -2107,7 +2107,7 @@ void task_numa_fault(int last_cpupid, int mem_node, int pages, int flags)
static void reset_ptenuma_scan(struct task_struct *p)
{
- ACCESS_ONCE(p->mm->numa_scan_seq)++;
+ WRITE_ONCE(p->mm->numa_scan_seq, READ_ONCE(p->mm->numa_scan_seq) + 1);
p->mm->numa_scan_offset = 0;
}