Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e25839f6 authored by Wanpeng Li's avatar Wanpeng Li Committed by Pekka Enberg
Browse files

mm/slab: Sharing s_next and s_stop between slab and slub



This patch shares s_next and s_stop between slab and slub.

Acked-by: default avatarChristoph Lameter <cl@linux.com>
Signed-off-by: default avatarWanpeng Li <liwanp@linux.vnet.ibm.com>
Signed-off-by: default avatarPekka Enberg <penberg@kernel.org>
parent 0fa8103b
Loading
Loading
Loading
Loading
+0 −10
Original line number Diff line number Diff line
@@ -4438,16 +4438,6 @@ static int leaks_show(struct seq_file *m, void *p)
	return 0;
}

static void *s_next(struct seq_file *m, void *p, loff_t *pos)
{
	return seq_list_next(p, &slab_caches, pos);
}

static void s_stop(struct seq_file *m, void *p)
{
	mutex_unlock(&slab_mutex);
}

static const struct seq_operations slabstats_op = {
	.start = leaks_start,
	.next = s_next,
+3 −0
Original line number Diff line number Diff line
@@ -271,3 +271,6 @@ struct kmem_cache_node {
#endif

};

void *s_next(struct seq_file *m, void *p, loff_t *pos);
void s_stop(struct seq_file *m, void *p);
+2 −2
Original line number Diff line number Diff line
@@ -529,12 +529,12 @@ static void *s_start(struct seq_file *m, loff_t *pos)
	return seq_list_start(&slab_caches, *pos);
}

static void *s_next(struct seq_file *m, void *p, loff_t *pos)
void *s_next(struct seq_file *m, void *p, loff_t *pos)
{
	return seq_list_next(p, &slab_caches, pos);
}

static void s_stop(struct seq_file *m, void *p)
void s_stop(struct seq_file *m, void *p)
{
	mutex_unlock(&slab_mutex);
}