aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/proc_misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/proc/proc_misc.c')
-rw-r--r--fs/proc/proc_misc.c21
1 files changed, 2 insertions, 19 deletions
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c
index a11968bc0516..3462bfde89f6 100644
--- a/fs/proc/proc_misc.c
+++ b/fs/proc/proc_misc.c
@@ -410,7 +410,7 @@ static const struct file_operations proc_modules_operations = {
410}; 410};
411#endif 411#endif
412 412
413#ifdef CONFIG_SLAB 413#ifdef CONFIG_SLABINFO
414static int slabinfo_open(struct inode *inode, struct file *file) 414static int slabinfo_open(struct inode *inode, struct file *file)
415{ 415{
416 return seq_open(file, &slabinfo_op); 416 return seq_open(file, &slabinfo_op);
@@ -451,20 +451,6 @@ static const struct file_operations proc_slabstats_operations = {
451#endif 451#endif
452#endif 452#endif
453 453
454#ifdef CONFIG_SLUB
455static int slabinfo_open(struct inode *inode, struct file *file)
456{
457 return seq_open(file, &slabinfo_op);
458}
459
460static const struct file_operations proc_slabinfo_operations = {
461 .open = slabinfo_open,
462 .read = seq_read,
463 .llseek = seq_lseek,
464 .release = seq_release,
465};
466#endif
467
468static int show_stat(struct seq_file *p, void *v) 454static int show_stat(struct seq_file *p, void *v)
469{ 455{
470 int i; 456 int i;
@@ -742,15 +728,12 @@ void __init proc_misc_init(void)
742#endif 728#endif
743 create_seq_entry("stat", 0, &proc_stat_operations); 729 create_seq_entry("stat", 0, &proc_stat_operations);
744 create_seq_entry("interrupts", 0, &proc_interrupts_operations); 730 create_seq_entry("interrupts", 0, &proc_interrupts_operations);
745#ifdef CONFIG_SLAB 731#ifdef CONFIG_SLABINFO
746 create_seq_entry("slabinfo",S_IWUSR|S_IRUGO,&proc_slabinfo_operations); 732 create_seq_entry("slabinfo",S_IWUSR|S_IRUGO,&proc_slabinfo_operations);
747#ifdef CONFIG_DEBUG_SLAB_LEAK 733#ifdef CONFIG_DEBUG_SLAB_LEAK
748 create_seq_entry("slab_allocators", 0 ,&proc_slabstats_operations); 734 create_seq_entry("slab_allocators", 0 ,&proc_slabstats_operations);
749#endif 735#endif
750#endif 736#endif
751#ifdef CONFIG_SLUB
752 create_seq_entry("slabinfo", S_IWUSR|S_IRUGO, &proc_slabinfo_operations);
753#endif
754 create_seq_entry("buddyinfo",S_IRUGO, &fragmentation_file_operations); 737 create_seq_entry("buddyinfo",S_IRUGO, &fragmentation_file_operations);
755 create_seq_entry("pagetypeinfo", S_IRUGO, &pagetypeinfo_file_ops); 738 create_seq_entry("pagetypeinfo", S_IRUGO, &pagetypeinfo_file_ops);
756 create_seq_entry("vmstat",S_IRUGO, &proc_vmstat_file_operations); 739 create_seq_entry("vmstat",S_IRUGO, &proc_vmstat_file_operations);