mm: replace __get_cpu_var uses with this_cpu_ptr
Replace places where __get_cpu_var() is used for an address calculation with this_cpu_ptr(). Signed-off-by: Christoph Lameter <cl@linux.com> Cc: Tejun Heo <tj@kernel.org> Cc: Hugh Dickins <hughd@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
此提交包含在:
@@ -2209,7 +2209,7 @@ static inline void *new_slab_objects(struct kmem_cache *s, gfp_t flags,
|
||||
|
||||
page = new_slab(s, flags, node);
|
||||
if (page) {
|
||||
c = __this_cpu_ptr(s->cpu_slab);
|
||||
c = raw_cpu_ptr(s->cpu_slab);
|
||||
if (c->page)
|
||||
flush_slab(s, c);
|
||||
|
||||
@@ -2425,7 +2425,7 @@ redo:
|
||||
* and the retrieval of the tid.
|
||||
*/
|
||||
preempt_disable();
|
||||
c = __this_cpu_ptr(s->cpu_slab);
|
||||
c = this_cpu_ptr(s->cpu_slab);
|
||||
|
||||
/*
|
||||
* The transaction ids are globally unique per cpu and per operation on
|
||||
@@ -2681,7 +2681,7 @@ redo:
|
||||
* during the cmpxchg then the free will succedd.
|
||||
*/
|
||||
preempt_disable();
|
||||
c = __this_cpu_ptr(s->cpu_slab);
|
||||
c = this_cpu_ptr(s->cpu_slab);
|
||||
|
||||
tid = c->tid;
|
||||
preempt_enable();
|
||||
|
新增問題並參考
封鎖使用者