Merge c29b5b3d33 ("mm: slab: make slab iterator functions static") into android-mainline

Steps on the way to 5.17-rc1

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I11b3c35e04850c143fca51deb296927a72a645a6
This commit is contained in:
Greg Kroah-Hartman 2022-02-09 14:44:00 +01:00
commit 51d71e7fbd
3 changed files with 15 additions and 20 deletions

View File

@ -4850,6 +4850,17 @@ static ssize_t memcg_write_event_control(struct kernfs_open_file *of,
return ret;
}
#if defined(CONFIG_MEMCG_KMEM) && (defined(CONFIG_SLAB) || defined(CONFIG_SLUB_DEBUG))
static int mem_cgroup_slab_show(struct seq_file *m, void *p)
{
/*
* Deprecated.
* Please, take a look at tools/cgroup/slabinfo.py .
*/
return 0;
}
#endif
static struct cftype mem_cgroup_legacy_files[] = {
{
.name = "usage_in_bytes",
@ -4950,7 +4961,7 @@ static struct cftype mem_cgroup_legacy_files[] = {
(defined(CONFIG_SLAB) || defined(CONFIG_SLUB_DEBUG))
{
.name = "kmem.slabinfo",
.seq_show = memcg_slab_show,
.seq_show = mem_cgroup_slab_show,
},
#endif
{

View File

@ -794,11 +794,6 @@ static inline struct kmem_cache_node *get_node(struct kmem_cache *s, int node)
#endif
void *slab_start(struct seq_file *m, loff_t *pos);
void *slab_next(struct seq_file *m, void *p, loff_t *pos);
void slab_stop(struct seq_file *m, void *p);
int memcg_slab_show(struct seq_file *m, void *p);
#if defined(CONFIG_SLAB) || defined(CONFIG_SLUB_DEBUG)
void dump_unreclaimable_slab(void);
#else

View File

@ -1039,18 +1039,18 @@ static void print_slabinfo_header(struct seq_file *m)
seq_putc(m, '\n');
}
void *slab_start(struct seq_file *m, loff_t *pos)
static void *slab_start(struct seq_file *m, loff_t *pos)
{
mutex_lock(&slab_mutex);
return seq_list_start(&slab_caches, *pos);
}
void *slab_next(struct seq_file *m, void *p, loff_t *pos)
static void *slab_next(struct seq_file *m, void *p, loff_t *pos)
{
return seq_list_next(p, &slab_caches, pos);
}
void slab_stop(struct seq_file *m, void *p)
static void slab_stop(struct seq_file *m, void *p)
{
mutex_unlock(&slab_mutex);
}
@ -1118,17 +1118,6 @@ void dump_unreclaimable_slab(void)
mutex_unlock(&slab_mutex);
}
#if defined(CONFIG_MEMCG_KMEM)
int memcg_slab_show(struct seq_file *m, void *p)
{
/*
* Deprecated.
* Please, take a look at tools/cgroup/slabinfo.py .
*/
return 0;
}
#endif
/*
* slabinfo_op - iterator that generates /proc/slabinfo
*