aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slab.c
diff options
context:
space:
mode:
authorJoonsoo Kim <iamjoonsoo.kim@lge.com>2013-10-23 21:07:41 -0400
committerPekka Enberg <penberg@iki.fi>2013-10-24 13:17:29 -0400
commit07d417a1c6f1e386a2276b0cae8ae1d14b8a32cc (patch)
tree76c1f4aa71e875019523c95c23f594819360c3cb /mm/slab.c
parent1ea991b00c26e3a275e2d2e110e5221211fc45b6 (diff)
slab: remove cachep in struct slab_rcu
We can get cachep using page in struct slab_rcu, so remove it. Acked-by: Andi Kleen <ak@linux.intel.com> Acked-by: Christoph Lameter <cl@linux.com> Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com> Signed-off-by: Pekka Enberg <penberg@iki.fi>
Diffstat (limited to 'mm/slab.c')
-rw-r--r--mm/slab.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/mm/slab.c b/mm/slab.c
index 71ba8f53f9b7..7e1aabe2b5d8 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -204,7 +204,6 @@ typedef unsigned int kmem_bufctl_t;
204 */ 204 */
205struct slab_rcu { 205struct slab_rcu {
206 struct rcu_head head; 206 struct rcu_head head;
207 struct kmem_cache *cachep;
208 struct page *page; 207 struct page *page;
209}; 208};
210 209
@@ -1824,7 +1823,7 @@ static void kmem_freepages(struct kmem_cache *cachep, struct page *page)
1824static void kmem_rcu_free(struct rcu_head *head) 1823static void kmem_rcu_free(struct rcu_head *head)
1825{ 1824{
1826 struct slab_rcu *slab_rcu = (struct slab_rcu *)head; 1825 struct slab_rcu *slab_rcu = (struct slab_rcu *)head;
1827 struct kmem_cache *cachep = slab_rcu->cachep; 1826 struct kmem_cache *cachep = slab_rcu->page->slab_cache;
1828 1827
1829 kmem_freepages(cachep, slab_rcu->page); 1828 kmem_freepages(cachep, slab_rcu->page);
1830 if (OFF_SLAB(cachep)) 1829 if (OFF_SLAB(cachep))
@@ -2052,7 +2051,6 @@ static void slab_destroy(struct kmem_cache *cachep, struct slab *slabp)
2052 struct slab_rcu *slab_rcu; 2051 struct slab_rcu *slab_rcu;
2053 2052
2054 slab_rcu = (struct slab_rcu *)slabp; 2053 slab_rcu = (struct slab_rcu *)slabp;
2055 slab_rcu->cachep = cachep;
2056 slab_rcu->page = page; 2054 slab_rcu->page = page;
2057 call_rcu(&slab_rcu->head, kmem_rcu_free); 2055 call_rcu(&slab_rcu->head, kmem_rcu_free);
2058 } else { 2056 } else {