mm/sl[au]b: Move print_slabinfo_header to slab_common.c

The header format is highly similar between slab and slub. The main
difference lays in the fact that slab may optionally have statistics
added here in case of CONFIG_SLAB_DEBUG, while the slub will stick them
somewhere else.

By making sure that information conditionally lives inside a
globally-visible CONFIG_DEBUG_SLAB switch, we can move the header
printing to a common location.

Signed-off-by: Glauber Costa <glommer@parallels.com>
Acked-by: Christoph Lameter <cl@linux.com>
CC: David Rientjes <rientjes@google.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
This commit is contained in:
Glauber Costa
2012-10-19 18:20:26 +04:00
committed by Pekka Enberg
parent b7454ad3cf
commit bcee6e2a13
4 changed files with 23 additions and 36 deletions

View File

@@ -49,8 +49,6 @@ int __kmem_cache_shutdown(struct kmem_cache *);
struct seq_file;
struct file;
void print_slabinfo_header(struct seq_file *m);
int slabinfo_show(struct seq_file *m, void *p);
ssize_t slabinfo_write(struct file *file, const char __user *buffer,