Skip to content

Commit

Permalink
mm/slub: Simplify struct slab slabs field definition
Browse files Browse the repository at this point in the history
Before commit b47291e ("mm, slub: change percpu partial accounting
from objects to pages") we had to fit two integer fields into a native
word size, so we used short int on 32-bit and int on 64-bit via #ifdef.
After that commit there is only one integer field, so we can simply
define it as int everywhere.

Signed-off-by: Vlastimil Babka <[email protected]>
Acked-by: Johannes Weiner <[email protected]>
Reviewed-by: Roman Gushchin <[email protected]>
  • Loading branch information
tehcaster committed Jan 6, 2022
1 parent 401fb12 commit 662188c
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions mm/slab.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,7 @@ struct slab {
struct rcu_head rcu_head;
struct {
struct slab *next;
#ifdef CONFIG_64BIT
int slabs; /* Nr of slabs left */
#else
short int slabs;
#endif
};
};
struct kmem_cache *slab_cache;
Expand Down

0 comments on commit 662188c

Please sign in to comment.