aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
Diffstat (limited to 'mm')
-rw-r--r--mm/vmstat.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/mm/vmstat.c b/mm/vmstat.c
index f45d7245a282..d624d251946d 100644
--- a/mm/vmstat.c
+++ b/mm/vmstat.c
@@ -600,13 +600,25 @@ static const struct file_operations fragmentation_file_operations = {
600 .release = seq_release, 600 .release = seq_release,
601}; 601};
602 602
603const struct seq_operations pagetypeinfo_op = { 603static const struct seq_operations pagetypeinfo_op = {
604 .start = frag_start, 604 .start = frag_start,
605 .next = frag_next, 605 .next = frag_next,
606 .stop = frag_stop, 606 .stop = frag_stop,
607 .show = pagetypeinfo_show, 607 .show = pagetypeinfo_show,
608}; 608};
609 609
610static int pagetypeinfo_open(struct inode *inode, struct file *file)
611{
612 return seq_open(file, &pagetypeinfo_op);
613}
614
615static const struct file_operations pagetypeinfo_file_ops = {
616 .open = pagetypeinfo_open,
617 .read = seq_read,
618 .llseek = seq_lseek,
619 .release = seq_release,
620};
621
610#ifdef CONFIG_ZONE_DMA 622#ifdef CONFIG_ZONE_DMA
611#define TEXT_FOR_DMA(xx) xx "_dma", 623#define TEXT_FOR_DMA(xx) xx "_dma",
612#else 624#else
@@ -925,6 +937,7 @@ static int __init setup_vmstat(void)
925#endif 937#endif
926#ifdef CONFIG_PROC_FS 938#ifdef CONFIG_PROC_FS
927 proc_create("buddyinfo", S_IRUGO, NULL, &fragmentation_file_operations); 939 proc_create("buddyinfo", S_IRUGO, NULL, &fragmentation_file_operations);
940 proc_create("pagetypeinfo", S_IRUGO, NULL, &pagetypeinfo_file_ops);
928#endif 941#endif
929 return 0; 942 return 0;
930} 943}