[PATCH 2/3] mm, slub: unify access to s->cpu_slab by replacing raw_cpu_ptr() with this_cpu_ptr()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In current code, we use two forms to access s->cpu_slab

  * raw_cpu_ptr()
  * this_cpu_ptr()

This patch unify the access by replacing raw_cpu_ptr() with
this_cpu_ptr().

Signed-off-by: Wei Yang <richard.weiyang@xxxxxxxxx>
---
 mm/slub.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/slub.c b/mm/slub.c
index 11e49d95e0ac..715372a786e3 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2643,7 +2643,7 @@ static __always_inline void *slab_alloc_node(struct kmem_cache *s,
 	 */
 	do {
 		tid = this_cpu_read(s->cpu_slab->tid);
-		c = raw_cpu_ptr(s->cpu_slab);
+		c = this_cpu_ptr(s->cpu_slab);
 	} while (IS_ENABLED(CONFIG_PREEMPT) &&
 		 unlikely(tid != READ_ONCE(c->tid)));
 
@@ -2916,7 +2916,7 @@ static __always_inline void do_slab_free(struct kmem_cache *s,
 	 */
 	do {
 		tid = this_cpu_read(s->cpu_slab->tid);
-		c = raw_cpu_ptr(s->cpu_slab);
+		c = this_cpu_ptr(s->cpu_slab);
 	} while (IS_ENABLED(CONFIG_PREEMPT) &&
 		 unlikely(tid != READ_ONCE(c->tid)));
 
-- 
2.15.1




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux