Skip to content

Commit

Permalink
slab: Fix build failure in __kmem_cache_create()
Browse files Browse the repository at this point in the history
Fix build failure with CONFIG_DEBUG_SLAB=y && CONFIG_DEBUG_PAGEALLOC=y caused
by commit 8a13a4cc "mm/sl[aou]b: Shrink __kmem_cache_create() parameter lists".

mm/slab.c: In function '__kmem_cache_create':
mm/slab.c:2474: error: 'align' undeclared (first use in this function)
mm/slab.c:2474: error: (Each undeclared identifier is reported only once
mm/slab.c:2474: error: for each function it appears in.)
make[1]: *** [mm/slab.o] Error 1
make: *** [mm] Error 2

Acked-by: Christoph Lameter <[email protected]>
Signed-off-by: Tetsuo Handa <[email protected]>
Signed-off-by: Pekka Enberg <[email protected]>
  • Loading branch information
Tetsuo Handa authored and nikhil18 committed Feb 21, 2016
1 parent 4bc31b2 commit 7620598
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mm/slab.c
Original file line number Diff line number Diff line change
Expand Up @@ -2471,8 +2471,9 @@ __kmem_cache_create (struct kmem_cache *cachep, unsigned long flags)
}
#if FORCED_DEBUG && defined(CONFIG_DEBUG_PAGEALLOC)
if (size >= malloc_sizes[INDEX_L3 + 1].cs_size
&& cachep->object_size > cache_line_size() && ALIGN(size, align) < PAGE_SIZE) {
cachep->obj_offset += PAGE_SIZE - ALIGN(size, align);
&& cachep->object_size > cache_line_size()
&& ALIGN(size, cachep->align) < PAGE_SIZE) {
cachep->obj_offset += PAGE_SIZE - ALIGN(size, cachep->align);
size = PAGE_SIZE;
}
#endif
Expand Down

0 comments on commit 7620598

Please sign in to comment.