diff options
Diffstat (limited to 'fs/proc/proc_misc.c')
-rw-r--r-- | fs/proc/proc_misc.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c index 2d563979cb02..441a32f0e5f2 100644 --- a/fs/proc/proc_misc.c +++ b/fs/proc/proc_misc.c | |||
@@ -456,6 +456,20 @@ static const struct file_operations proc_slabstats_operations = { | |||
456 | #endif | 456 | #endif |
457 | #endif | 457 | #endif |
458 | 458 | ||
459 | #ifdef CONFIG_MMU | ||
460 | static int vmalloc_open(struct inode *inode, struct file *file) | ||
461 | { | ||
462 | return seq_open(file, &vmalloc_op); | ||
463 | } | ||
464 | |||
465 | static const struct file_operations proc_vmalloc_operations = { | ||
466 | .open = vmalloc_open, | ||
467 | .read = seq_read, | ||
468 | .llseek = seq_lseek, | ||
469 | .release = seq_release, | ||
470 | }; | ||
471 | #endif | ||
472 | |||
459 | static int show_stat(struct seq_file *p, void *v) | 473 | static int show_stat(struct seq_file *p, void *v) |
460 | { | 474 | { |
461 | int i; | 475 | int i; |
@@ -869,6 +883,9 @@ void __init proc_misc_init(void) | |||
869 | create_seq_entry("slab_allocators", 0 ,&proc_slabstats_operations); | 883 | create_seq_entry("slab_allocators", 0 ,&proc_slabstats_operations); |
870 | #endif | 884 | #endif |
871 | #endif | 885 | #endif |
886 | #ifdef CONFIG_MMU | ||
887 | proc_create("vmallocinfo", S_IRUSR, NULL, &proc_vmalloc_operations); | ||
888 | #endif | ||
872 | create_seq_entry("buddyinfo",S_IRUGO, &fragmentation_file_operations); | 889 | create_seq_entry("buddyinfo",S_IRUGO, &fragmentation_file_operations); |
873 | create_seq_entry("pagetypeinfo", S_IRUGO, &pagetypeinfo_file_ops); | 890 | create_seq_entry("pagetypeinfo", S_IRUGO, &pagetypeinfo_file_ops); |
874 | create_seq_entry("vmstat",S_IRUGO, &proc_vmstat_file_operations); | 891 | create_seq_entry("vmstat",S_IRUGO, &proc_vmstat_file_operations); |