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.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c
index 0071939c0095..5de7f874d95c 100644
--- a/fs/proc/proc_misc.c
+++ b/fs/proc/proc_misc.c
@@ -229,6 +229,19 @@ static const struct file_operations fragmentation_file_operations = {
229 .release = seq_release, 229 .release = seq_release,
230}; 230};
231 231
232extern struct seq_operations pagetypeinfo_op;
233static int pagetypeinfo_open(struct inode *inode, struct file *file)
234{
235 return seq_open(file, &pagetypeinfo_op);
236}
237
238static const struct file_operations pagetypeinfo_file_ops = {
239 .open = pagetypeinfo_open,
240 .read = seq_read,
241 .llseek = seq_lseek,
242 .release = seq_release,
243};
244
232extern struct seq_operations zoneinfo_op; 245extern struct seq_operations zoneinfo_op;
233static int zoneinfo_open(struct inode *inode, struct file *file) 246static int zoneinfo_open(struct inode *inode, struct file *file)
234{ 247{
@@ -724,6 +737,7 @@ void __init proc_misc_init(void)
724#endif 737#endif
725#endif 738#endif
726 create_seq_entry("buddyinfo",S_IRUGO, &fragmentation_file_operations); 739 create_seq_entry("buddyinfo",S_IRUGO, &fragmentation_file_operations);
740 create_seq_entry("pagetypeinfo", S_IRUGO, &pagetypeinfo_file_ops);
727 create_seq_entry("vmstat",S_IRUGO, &proc_vmstat_file_operations); 741 create_seq_entry("vmstat",S_IRUGO, &proc_vmstat_file_operations);
728 create_seq_entry("zoneinfo",S_IRUGO, &proc_zoneinfo_file_operations); 742 create_seq_entry("zoneinfo",S_IRUGO, &proc_zoneinfo_file_operations);
729#ifdef CONFIG_BLOCK 743#ifdef CONFIG_BLOCK