summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorWanpeng Li <liwanp@linux.vnet.ibm.com>2013-07-04 08:33:23 +0800
committerPekka Enberg <penberg@kernel.org>2013-07-07 18:37:47 +0300
commite25839f67948ca54fa55a45686d72c266f65f099 (patch)
tree485ed28182d02b2a86d3308f0da932e796b57b00 /mm
parent0fa8103be4c20f893486c533e4c6dfbc5ccddeb4 (diff)
downloadop-kernel-dev-e25839f67948ca54fa55a45686d72c266f65f099.zip
op-kernel-dev-e25839f67948ca54fa55a45686d72c266f65f099.tar.gz
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: Christoph Lameter <cl@linux.com> Signed-off-by: Wanpeng Li <liwanp@linux.vnet.ibm.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/slab.c10
-rw-r--r--mm/slab.h3
-rw-r--r--mm/slab_common.c4
3 files changed, 5 insertions, 12 deletions
diff --git a/mm/slab.c b/mm/slab.c
index c9b4da9..4a907a0 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -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,
diff --git a/mm/slab.h b/mm/slab.h
index f96b49e..95c8860 100644
--- a/mm/slab.h
+++ b/mm/slab.h
@@ -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);
diff --git a/mm/slab_common.c b/mm/slab_common.c
index d2517b0..68518eb 100644
--- a/mm/slab_common.c
+++ b/mm/slab_common.c
@@ -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);
}
OpenPOWER on IntegriCloud