summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeongjun Hong <hsj0512@snu.ac.kr>2026-07-01 14:06:33 +0000
committerVlastimil Babka (SUSE) <vbabka@kernel.org>2026-07-02 10:18:20 +0200
commitb2602886c61c4609c61fc12f9c04f6486f04748a (patch)
tree21316976eece25dc6f1a00eddbb1d86ee30d6d52
parentb0b6ec46e025fd46c344915a42bc535d9b15a1fb (diff)
downloadlinux-next-b2602886c61c4609c61fc12f9c04f6486f04748a.tar.gz
linux-next-b2602886c61c4609c61fc12f9c04f6486f04748a.zip
slab: remove unused SL_CPU slab_stat_type
Since the removal of the per-cpu slab in commit 32c894c7274b ("slab: remove struct kmem_cache_cpu"), show_slab_objects() no longer has a branch handling SO_CPU, so cpu_slabs_show() always produces "0". Emit "0\n" directly instead, matching the sibling cpu_partial and slabs_cpu_partial stubs, and remove the now-unused SO_CPU macro and SL_CPU enum value. No functional change intended; the cpu_slabs sysfs attribute continues to read 0. Signed-off-by: Seongjun Hong <hsj0512@snu.ac.kr> Reviewed-by: Harry Yoo (Oracle) <harry@kernel.org> Reviewed-by: Hao Li <hao.li@linux.dev> Link: https://patch.msgid.link/20260701140634.71608-1-hsj0512@snu.ac.kr Signed-off-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
-rw-r--r--mm/slub.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/mm/slub.c b/mm/slub.c
index 9f754cf1c187..550efd79d146 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -8968,14 +8968,12 @@ static void process_slab(struct loc_track *t, struct kmem_cache *s,
enum slab_stat_type {
SL_ALL, /* All slabs */
SL_PARTIAL, /* Only partially allocated slabs */
- SL_CPU, /* Only slabs used for cpu caches */
SL_OBJECTS, /* Determine allocated objects not slabs */
SL_TOTAL /* Determine object capacity not slabs */
};
#define SO_ALL (1 << SL_ALL)
#define SO_PARTIAL (1 << SL_PARTIAL)
-#define SO_CPU (1 << SL_CPU)
#define SO_OBJECTS (1 << SL_OBJECTS)
#define SO_TOTAL (1 << SL_TOTAL)
@@ -9164,7 +9162,7 @@ SLAB_ATTR_RO(partial);
static ssize_t cpu_slabs_show(struct kmem_cache *s, char *buf)
{
- return show_slab_objects(s, buf, SO_CPU);
+ return sysfs_emit(buf, "0\n");
}
SLAB_ATTR_RO(cpu_slabs);