]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
mm/slab: Sharing s_next and s_stop between slab and slub
authorWanpeng Li <liwanp@linux.vnet.ibm.com>
Thu, 4 Jul 2013 00:33:23 +0000 (08:33 +0800)
committerPekka Enberg <penberg@kernel.org>
Sun, 7 Jul 2013 15:37:47 +0000 (18:37 +0300)
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>
mm/slab.c
mm/slab.h
mm/slab_common.c

index c9b4da9a1fe59376db09c9e572116aef97753101..4a907a0726699f1e1987afccdeaee6362b6d000f 100644 (file)
--- 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,
index f96b49e4704efb1d362ef10c6eacef81afb9e6a0..95c88604aab7e3958a526633c0691ef7ce9f0a87 100644 (file)
--- 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);
index d2517b05d5bc488ba986c1f3c2993051dc9bd736..68518eb6722953e23621849ad77cc70d4ff6d322 100644 (file)
@@ -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);
 }