aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/slab.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/mm/slab.c b/mm/slab.c
index 84c4ed62c10d..f9e676edeb0f 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2865,7 +2865,6 @@ static inline void verify_redzone_free(struct kmem_cache *cache, void *obj)
2865static void *cache_free_debugcheck(struct kmem_cache *cachep, void *objp, 2865static void *cache_free_debugcheck(struct kmem_cache *cachep, void *objp,
2866 unsigned long caller) 2866 unsigned long caller)
2867{ 2867{
2868 struct page *page;
2869 unsigned int objnr; 2868 unsigned int objnr;
2870 struct slab *slabp; 2869 struct slab *slabp;
2871 2870
@@ -2873,9 +2872,7 @@ static void *cache_free_debugcheck(struct kmem_cache *cachep, void *objp,
2873 2872
2874 objp -= obj_offset(cachep); 2873 objp -= obj_offset(cachep);
2875 kfree_debugcheck(objp); 2874 kfree_debugcheck(objp);
2876 page = virt_to_head_page(objp); 2875 slabp = virt_to_slab(objp);
2877
2878 slabp = page->slab_page;
2879 2876
2880 if (cachep->flags & SLAB_RED_ZONE) { 2877 if (cachep->flags & SLAB_RED_ZONE) {
2881 verify_redzone_free(cachep, objp); 2878 verify_redzone_free(cachep, objp);
@@ -3087,7 +3084,7 @@ static void *cache_alloc_debugcheck_after(struct kmem_cache *cachep,
3087 struct slab *slabp; 3084 struct slab *slabp;
3088 unsigned objnr; 3085 unsigned objnr;
3089 3086
3090 slabp = virt_to_head_page(objp)->slab_page; 3087 slabp = virt_to_slab(objp);
3091 objnr = (unsigned)(objp - slabp->s_mem) / cachep->size; 3088 objnr = (unsigned)(objp - slabp->s_mem) / cachep->size;
3092 slab_bufctl(slabp)[objnr] = BUFCTL_ACTIVE; 3089 slab_bufctl(slabp)[objnr] = BUFCTL_ACTIVE;
3093 } 3090 }