Skip to content

Commit ad7c5eb

Browse files
Xiu Jianfengtehcaster
authored andcommitted
mm/slub: remove dummy slabinfo functions
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>
1 parent 4cece76 commit ad7c5eb

3 files changed

Lines changed: 0 additions & 15 deletions

File tree

mm/slab.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -496,9 +496,6 @@ struct slabinfo {
496496
};
497497

498498
void get_slabinfo(struct kmem_cache *s, struct slabinfo *sinfo);
499-
void slabinfo_show_stats(struct seq_file *m, struct kmem_cache *s);
500-
ssize_t slabinfo_write(struct file *file, const char __user *buffer,
501-
size_t count, loff_t *ppos);
502499

503500
#ifdef CONFIG_SLUB_DEBUG
504501
#ifdef CONFIG_SLUB_DEBUG_ON

mm/slab_common.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,7 +1078,6 @@ static void cache_show(struct kmem_cache *s, struct seq_file *m)
10781078
sinfo.limit, sinfo.batchcount, sinfo.shared);
10791079
seq_printf(m, " : slabdata %6lu %6lu %6lu",
10801080
sinfo.active_slabs, sinfo.num_slabs, sinfo.shared_avail);
1081-
slabinfo_show_stats(m, s);
10821081
seq_putc(m, '\n');
10831082
}
10841083

@@ -1155,7 +1154,6 @@ static const struct proc_ops slabinfo_proc_ops = {
11551154
.proc_flags = PROC_ENTRY_PERMANENT,
11561155
.proc_open = slabinfo_open,
11571156
.proc_read = seq_read,
1158-
.proc_write = slabinfo_write,
11591157
.proc_lseek = seq_lseek,
11601158
.proc_release = seq_release,
11611159
};

mm/slub.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7099,14 +7099,4 @@ void get_slabinfo(struct kmem_cache *s, struct slabinfo *sinfo)
70997099
sinfo->objects_per_slab = oo_objects(s->oo);
71007100
sinfo->cache_order = oo_order(s->oo);
71017101
}
7102-
7103-
void slabinfo_show_stats(struct seq_file *m, struct kmem_cache *s)
7104-
{
7105-
}
7106-
7107-
ssize_t slabinfo_write(struct file *file, const char __user *buffer,
7108-
size_t count, loff_t *ppos)
7109-
{
7110-
return -EIO;
7111-
}
71127102
#endif /* CONFIG_SLUB_DEBUG */

0 commit comments

Comments
 (0)