mm/slub: remove dummy slabinfo functions
authorXiu Jianfeng <xiujianfeng@huawei.com>
Thu, 21 Mar 2024 13:17:33 +0000 (13:17 +0000)
committerVlastimil Babka <vbabka@suse.cz>
Mon, 25 Mar 2024 08:34:41 +0000 (09:34 +0100)
The SLAB implementation has been removed since 6.8, so there is no
other version of slabinfo_show_stats() and slabinfo_write(), then we
can remove these two dummy functions.

Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
mm/slab.h
mm/slab_common.c
mm/slub.c

index d2bc9b191222929b8c99b40c96e3707b8d5e0ecf..78e205b46e19a84765db48fe03fd2204ac8a2f78 100644 (file)
--- a/mm/slab.h
+++ b/mm/slab.h
@@ -496,9 +496,6 @@ struct slabinfo {
 };
 
 void get_slabinfo(struct kmem_cache *s, struct slabinfo *sinfo);
-void slabinfo_show_stats(struct seq_file *m, struct kmem_cache *s);
-ssize_t slabinfo_write(struct file *file, const char __user *buffer,
-                      size_t count, loff_t *ppos);
 
 #ifdef CONFIG_SLUB_DEBUG
 #ifdef CONFIG_SLUB_DEBUG_ON
index f5234672f03ceab3b4c017f3b1acfc53cadb2393..67c03d6bd26cfb0523f05e5c09dcfdf7944eab08 100644 (file)
@@ -1078,7 +1078,6 @@ static void cache_show(struct kmem_cache *s, struct seq_file *m)
                   sinfo.limit, sinfo.batchcount, sinfo.shared);
        seq_printf(m, " : slabdata %6lu %6lu %6lu",
                   sinfo.active_slabs, sinfo.num_slabs, sinfo.shared_avail);
-       slabinfo_show_stats(m, s);
        seq_putc(m, '\n');
 }
 
@@ -1155,7 +1154,6 @@ static const struct proc_ops slabinfo_proc_ops = {
        .proc_flags     = PROC_ENTRY_PERMANENT,
        .proc_open      = slabinfo_open,
        .proc_read      = seq_read,
-       .proc_write     = slabinfo_write,
        .proc_lseek     = seq_lseek,
        .proc_release   = seq_release,
 };
index 1bb2a93cf7b6a415de2077e8f4e4f7999b85044c..cc7e68fbdbbac3674840dfe3f536d6de9740214d 100644 (file)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -7099,14 +7099,4 @@ void get_slabinfo(struct kmem_cache *s, struct slabinfo *sinfo)
        sinfo->objects_per_slab = oo_objects(s->oo);
        sinfo->cache_order = oo_order(s->oo);
 }
-
-void slabinfo_show_stats(struct seq_file *m, struct kmem_cache *s)
-{
-}
-
-ssize_t slabinfo_write(struct file *file, const char __user *buffer,
-                      size_t count, loff_t *ppos)
-{
-       return -EIO;
-}
 #endif /* CONFIG_SLUB_DEBUG */