mm/slub: Simplify struct slab slabs field definition
authorVlastimil Babka <vbabka@suse.cz>
Wed, 10 Nov 2021 11:57:43 +0000 (12:57 +0100)
committerVlastimil Babka <vbabka@suse.cz>
Thu, 6 Jan 2022 11:26:45 +0000 (12:26 +0100)
Before commit b47291ef02b0 ("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 <vbabka@suse.cz>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Roman Gushchin <guro@fb.com>
mm/slab.h

index ad15f624a6b5bcd871c2420b7a63a1265322d44b..495008f89bf6e2d29e53dc09b1b64aa69bff5a99 100644 (file)
--- a/mm/slab.h
+++ b/mm/slab.h
@@ -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;