Commit e25839f67948ca54fa55a45686d72c266f65f099

Authored by Wanpeng Li
Committed by Pekka Enberg
1 parent 0fa8103be4

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>

Showing 3 changed files with 5 additions and 12 deletions Side-by-side Diff

... ... @@ -4438,16 +4438,6 @@
4438 4438 return 0;
4439 4439 }
4440 4440  
4441   -static void *s_next(struct seq_file *m, void *p, loff_t *pos)
4442   -{
4443   - return seq_list_next(p, &slab_caches, pos);
4444   -}
4445   -
4446   -static void s_stop(struct seq_file *m, void *p)
4447   -{
4448   - mutex_unlock(&slab_mutex);
4449   -}
4450   -
4451 4441 static const struct seq_operations slabstats_op = {
4452 4442 .start = leaks_start,
4453 4443 .next = s_next,
... ... @@ -271,4 +271,7 @@
271 271 #endif
272 272  
273 273 };
  274 +
  275 +void *s_next(struct seq_file *m, void *p, loff_t *pos);
  276 +void s_stop(struct seq_file *m, void *p);
... ... @@ -529,12 +529,12 @@
529 529 return seq_list_start(&slab_caches, *pos);
530 530 }
531 531  
532   -static void *s_next(struct seq_file *m, void *p, loff_t *pos)
  532 +void *s_next(struct seq_file *m, void *p, loff_t *pos)
533 533 {
534 534 return seq_list_next(p, &slab_caches, pos);
535 535 }
536 536  
537   -static void s_stop(struct seq_file *m, void *p)
  537 +void s_stop(struct seq_file *m, void *p)
538 538 {
539 539 mutex_unlock(&slab_mutex);
540 540 }