]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/proc/proc_misc.c
proc: move /proc/zoneinfo boilerplate to mm/vmstat.c
[linux-2.6-omap-h63xx.git] / fs / proc / proc_misc.c
index 1d6d5c5cc2a832675ad59078edc4e1516c18399a..8f3a6f085c5f0ffda0d1c4b220292d8ec757d2d0 100644 (file)
 #include <asm/div64.h>
 #include "internal.h"
 
-static int fragmentation_open(struct inode *inode, struct file *file)
-{
-       (void)inode;
-       return seq_open(file, &fragmentation_op);
-}
-
-static const struct file_operations fragmentation_file_operations = {
-       .open           = fragmentation_open,
-       .read           = seq_read,
-       .llseek         = seq_lseek,
-       .release        = seq_release,
-};
-
-static int pagetypeinfo_open(struct inode *inode, struct file *file)
-{
-       return seq_open(file, &pagetypeinfo_op);
-}
-
-static const struct file_operations pagetypeinfo_file_ops = {
-       .open           = pagetypeinfo_open,
-       .read           = seq_read,
-       .llseek         = seq_lseek,
-       .release        = seq_release,
-};
-
-static int zoneinfo_open(struct inode *inode, struct file *file)
-{
-       return seq_open(file, &zoneinfo_op);
-}
-
-static const struct file_operations proc_zoneinfo_file_operations = {
-       .open           = zoneinfo_open,
-       .read           = seq_read,
-       .llseek         = seq_lseek,
-       .release        = seq_release,
-};
-
-static int vmstat_open(struct inode *inode, struct file *file)
-{
-       return seq_open(file, &vmstat_op);
-}
-static const struct file_operations proc_vmstat_file_operations = {
-       .open           = vmstat_open,
-       .read           = seq_read,
-       .llseek         = seq_lseek,
-       .release        = seq_release,
-};
-
 #ifdef CONFIG_BLOCK
 static int diskstats_open(struct inode *inode, struct file *file)
 {
@@ -132,31 +84,6 @@ static const struct file_operations proc_modules_operations = {
 };
 #endif
 
-#ifdef CONFIG_MMU
-static int vmalloc_open(struct inode *inode, struct file *file)
-{
-       unsigned int *ptr = NULL;
-       int ret;
-
-       if (NUMA_BUILD)
-               ptr = kmalloc(nr_node_ids * sizeof(unsigned int), GFP_KERNEL);
-       ret = seq_open(file, &vmalloc_op);
-       if (!ret) {
-               struct seq_file *m = file->private_data;
-               m->private = ptr;
-       } else
-               kfree(ptr);
-       return ret;
-}
-
-static const struct file_operations proc_vmalloc_operations = {
-       .open           = vmalloc_open,
-       .read           = seq_read,
-       .llseek         = seq_lseek,
-       .release        = seq_release_private,
-};
-#endif
-
 #ifdef CONFIG_PROC_PAGE_MONITOR
 #define KPMSIZE sizeof(u64)
 #define KPMMASK (KPMSIZE - 1)
@@ -295,13 +222,6 @@ void __init proc_misc_init(void)
        proc_symlink("mounts", NULL, "self/mounts");
 
        /* And now for trickier ones */
-#ifdef CONFIG_MMU
-       proc_create("vmallocinfo", S_IRUSR, NULL, &proc_vmalloc_operations);
-#endif
-       proc_create("buddyinfo", S_IRUGO, NULL, &fragmentation_file_operations);
-       proc_create("pagetypeinfo", S_IRUGO, NULL, &pagetypeinfo_file_ops);
-       proc_create("vmstat", S_IRUGO, NULL, &proc_vmstat_file_operations);
-       proc_create("zoneinfo", S_IRUGO, NULL, &proc_zoneinfo_file_operations);
 #ifdef CONFIG_BLOCK
        proc_create("diskstats", 0, NULL, &proc_diskstats_operations);
 #endif