From: Joonsoo Kim Date: Thu, 24 Oct 2013 01:07:41 +0000 (+0900) Subject: slab: remove cachep in struct slab_rcu X-Git-Tag: accepted/tizen/common/20141203.182822~1051^2~3^2~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=07d417a1c6f1e386a2276b0cae8ae1d14b8a32cc;p=platform%2Fkernel%2Flinux-arm64.git slab: remove cachep in struct slab_rcu We can get cachep using page in struct slab_rcu, so remove it. Acked-by: Andi Kleen Acked-by: Christoph Lameter Signed-off-by: Joonsoo Kim Signed-off-by: Pekka Enberg --- diff --git a/mm/slab.c b/mm/slab.c index 71ba8f5..7e1aabe 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -204,7 +204,6 @@ typedef unsigned int kmem_bufctl_t; */ struct slab_rcu { struct rcu_head head; - struct kmem_cache *cachep; struct page *page; }; @@ -1824,7 +1823,7 @@ static void kmem_freepages(struct kmem_cache *cachep, struct page *page) static void kmem_rcu_free(struct rcu_head *head) { struct slab_rcu *slab_rcu = (struct slab_rcu *)head; - struct kmem_cache *cachep = slab_rcu->cachep; + struct kmem_cache *cachep = slab_rcu->page->slab_cache; kmem_freepages(cachep, slab_rcu->page); if (OFF_SLAB(cachep)) @@ -2052,7 +2051,6 @@ static void slab_destroy(struct kmem_cache *cachep, struct slab *slabp) struct slab_rcu *slab_rcu; slab_rcu = (struct slab_rcu *)slabp; - slab_rcu->cachep = cachep; slab_rcu->page = page; call_rcu(&slab_rcu->head, kmem_rcu_free); } else {