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 <[email protected]>
Acked-by: Christoph Lameter <[email protected]>
CC: David Rientjes <[email protected]>
Signed-off-by: Pekka Enberg <[email protected]>
This commit is contained in:
Glauber Costa 2012-10-19 18:20:26 +04:00 • committed by Pekka Enberg
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,