diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/proc/internal.h | 2 | ||||
-rw-r--r-- | fs/proc/nommu.c | 2 | ||||
-rw-r--r-- | fs/proc/proc_misc.c | 66 | ||||
-rw-r--r-- | fs/proc/proc_tty.c | 5 |
4 files changed, 24 insertions, 51 deletions
diff --git a/fs/proc/internal.h b/fs/proc/internal.h index 45abb9803988..b1d6df671edf 100644 --- a/fs/proc/internal.h +++ b/fs/proc/internal.h | |||
@@ -46,8 +46,6 @@ extern int nommu_vma_show(struct seq_file *, struct vm_area_struct *); | |||
46 | 46 | ||
47 | extern int maps_protect; | 47 | extern int maps_protect; |
48 | 48 | ||
49 | extern void create_seq_entry(char *name, mode_t mode, | ||
50 | const struct file_operations *f); | ||
51 | extern int proc_tid_stat(struct seq_file *m, struct pid_namespace *ns, | 49 | extern int proc_tid_stat(struct seq_file *m, struct pid_namespace *ns, |
52 | struct pid *pid, struct task_struct *task); | 50 | struct pid *pid, struct task_struct *task); |
53 | extern int proc_tgid_stat(struct seq_file *m, struct pid_namespace *ns, | 51 | extern int proc_tgid_stat(struct seq_file *m, struct pid_namespace *ns, |
diff --git a/fs/proc/nommu.c b/fs/proc/nommu.c index 941e95114b5a..79ecd281d2cb 100644 --- a/fs/proc/nommu.c +++ b/fs/proc/nommu.c | |||
@@ -137,7 +137,7 @@ static const struct file_operations proc_nommu_vma_list_operations = { | |||
137 | 137 | ||
138 | static int __init proc_nommu_init(void) | 138 | static int __init proc_nommu_init(void) |
139 | { | 139 | { |
140 | create_seq_entry("maps", S_IRUGO, &proc_nommu_vma_list_operations); | 140 | proc_create("maps", S_IRUGO, NULL, &proc_nommu_vma_list_operations); |
141 | return 0; | 141 | return 0; |
142 | } | 142 | } |
143 | 143 | ||
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c index 441a32f0e5f2..c4137bb94a9e 100644 --- a/fs/proc/proc_misc.c +++ b/fs/proc/proc_misc.c | |||
@@ -826,14 +826,6 @@ static struct file_operations proc_kpageflags_operations = { | |||
826 | 826 | ||
827 | struct proc_dir_entry *proc_root_kcore; | 827 | struct proc_dir_entry *proc_root_kcore; |
828 | 828 | ||
829 | void create_seq_entry(char *name, mode_t mode, const struct file_operations *f) | ||
830 | { | ||
831 | struct proc_dir_entry *entry; | ||
832 | entry = create_proc_entry(name, mode, NULL); | ||
833 | if (entry) | ||
834 | entry->proc_fops = f; | ||
835 | } | ||
836 | |||
837 | void __init proc_misc_init(void) | 829 | void __init proc_misc_init(void) |
838 | { | 830 | { |
839 | static struct { | 831 | static struct { |
@@ -862,66 +854,52 @@ void __init proc_misc_init(void) | |||
862 | 854 | ||
863 | /* And now for trickier ones */ | 855 | /* And now for trickier ones */ |
864 | #ifdef CONFIG_PRINTK | 856 | #ifdef CONFIG_PRINTK |
865 | { | 857 | proc_create("kmsg", S_IRUSR, &proc_root, &proc_kmsg_operations); |
866 | struct proc_dir_entry *entry; | ||
867 | entry = create_proc_entry("kmsg", S_IRUSR, &proc_root); | ||
868 | if (entry) | ||
869 | entry->proc_fops = &proc_kmsg_operations; | ||
870 | } | ||
871 | #endif | 858 | #endif |
872 | create_seq_entry("locks", 0, &proc_locks_operations); | 859 | proc_create("locks", 0, NULL, &proc_locks_operations); |
873 | create_seq_entry("devices", 0, &proc_devinfo_operations); | 860 | proc_create("devices", 0, NULL, &proc_devinfo_operations); |
874 | create_seq_entry("cpuinfo", 0, &proc_cpuinfo_operations); | 861 | proc_create("cpuinfo", 0, NULL, &proc_cpuinfo_operations); |
875 | #ifdef CONFIG_BLOCK | 862 | #ifdef CONFIG_BLOCK |
876 | create_seq_entry("partitions", 0, &proc_partitions_operations); | 863 | proc_create("partitions", 0, NULL, &proc_partitions_operations); |
877 | #endif | 864 | #endif |
878 | create_seq_entry("stat", 0, &proc_stat_operations); | 865 | proc_create("stat", 0, NULL, &proc_stat_operations); |
879 | create_seq_entry("interrupts", 0, &proc_interrupts_operations); | 866 | proc_create("interrupts", 0, NULL, &proc_interrupts_operations); |
880 | #ifdef CONFIG_SLABINFO | 867 | #ifdef CONFIG_SLABINFO |
881 | create_seq_entry("slabinfo",S_IWUSR|S_IRUGO,&proc_slabinfo_operations); | 868 | proc_create("slabinfo",S_IWUSR|S_IRUGO,NULL,&proc_slabinfo_operations); |
882 | #ifdef CONFIG_DEBUG_SLAB_LEAK | 869 | #ifdef CONFIG_DEBUG_SLAB_LEAK |
883 | create_seq_entry("slab_allocators", 0 ,&proc_slabstats_operations); | 870 | proc_create("slab_allocators", 0, NULL, &proc_slabstats_operations); |
884 | #endif | 871 | #endif |
885 | #endif | 872 | #endif |
886 | #ifdef CONFIG_MMU | 873 | #ifdef CONFIG_MMU |
887 | proc_create("vmallocinfo", S_IRUSR, NULL, &proc_vmalloc_operations); | 874 | proc_create("vmallocinfo", S_IRUSR, NULL, &proc_vmalloc_operations); |
888 | #endif | 875 | #endif |
889 | create_seq_entry("buddyinfo",S_IRUGO, &fragmentation_file_operations); | 876 | proc_create("buddyinfo", S_IRUGO, NULL, &fragmentation_file_operations); |
890 | create_seq_entry("pagetypeinfo", S_IRUGO, &pagetypeinfo_file_ops); | 877 | proc_create("pagetypeinfo", S_IRUGO, NULL, &pagetypeinfo_file_ops); |
891 | create_seq_entry("vmstat",S_IRUGO, &proc_vmstat_file_operations); | 878 | proc_create("vmstat", S_IRUGO, NULL, &proc_vmstat_file_operations); |
892 | create_seq_entry("zoneinfo",S_IRUGO, &proc_zoneinfo_file_operations); | 879 | proc_create("zoneinfo", S_IRUGO, NULL, &proc_zoneinfo_file_operations); |
893 | #ifdef CONFIG_BLOCK | 880 | #ifdef CONFIG_BLOCK |
894 | create_seq_entry("diskstats", 0, &proc_diskstats_operations); | 881 | proc_create("diskstats", 0, NULL, &proc_diskstats_operations); |
895 | #endif | 882 | #endif |
896 | #ifdef CONFIG_MODULES | 883 | #ifdef CONFIG_MODULES |
897 | create_seq_entry("modules", 0, &proc_modules_operations); | 884 | proc_create("modules", 0, NULL, &proc_modules_operations); |
898 | #endif | 885 | #endif |
899 | #ifdef CONFIG_SCHEDSTATS | 886 | #ifdef CONFIG_SCHEDSTATS |
900 | create_seq_entry("schedstat", 0, &proc_schedstat_operations); | 887 | proc_create("schedstat", 0, NULL, &proc_schedstat_operations); |
901 | #endif | 888 | #endif |
902 | #ifdef CONFIG_PROC_KCORE | 889 | #ifdef CONFIG_PROC_KCORE |
903 | proc_root_kcore = create_proc_entry("kcore", S_IRUSR, NULL); | 890 | proc_root_kcore = proc_create("kcore", S_IRUSR, NULL, &proc_kcore_operations); |
904 | if (proc_root_kcore) { | 891 | if (proc_root_kcore) |
905 | proc_root_kcore->proc_fops = &proc_kcore_operations; | ||
906 | proc_root_kcore->size = | 892 | proc_root_kcore->size = |
907 | (size_t)high_memory - PAGE_OFFSET + PAGE_SIZE; | 893 | (size_t)high_memory - PAGE_OFFSET + PAGE_SIZE; |
908 | } | ||
909 | #endif | 894 | #endif |
910 | #ifdef CONFIG_PROC_PAGE_MONITOR | 895 | #ifdef CONFIG_PROC_PAGE_MONITOR |
911 | create_seq_entry("kpagecount", S_IRUSR, &proc_kpagecount_operations); | 896 | proc_create("kpagecount", S_IRUSR, NULL, &proc_kpagecount_operations); |
912 | create_seq_entry("kpageflags", S_IRUSR, &proc_kpageflags_operations); | 897 | proc_create("kpageflags", S_IRUSR, NULL, &proc_kpageflags_operations); |
913 | #endif | 898 | #endif |
914 | #ifdef CONFIG_PROC_VMCORE | 899 | #ifdef CONFIG_PROC_VMCORE |
915 | proc_vmcore = create_proc_entry("vmcore", S_IRUSR, NULL); | 900 | proc_vmcore = proc_create("vmcore", S_IRUSR, NULL, &proc_vmcore_operations); |
916 | if (proc_vmcore) | ||
917 | proc_vmcore->proc_fops = &proc_vmcore_operations; | ||
918 | #endif | 901 | #endif |
919 | #ifdef CONFIG_MAGIC_SYSRQ | 902 | #ifdef CONFIG_MAGIC_SYSRQ |
920 | { | 903 | proc_create("sysrq-trigger", S_IWUSR, NULL, &proc_sysrq_trigger_operations); |
921 | struct proc_dir_entry *entry; | ||
922 | entry = create_proc_entry("sysrq-trigger", S_IWUSR, NULL); | ||
923 | if (entry) | ||
924 | entry->proc_fops = &proc_sysrq_trigger_operations; | ||
925 | } | ||
926 | #endif | 904 | #endif |
927 | } | 905 | } |
diff --git a/fs/proc/proc_tty.c b/fs/proc/proc_tty.c index 49816e00b51a..63f45383035d 100644 --- a/fs/proc/proc_tty.c +++ b/fs/proc/proc_tty.c | |||
@@ -214,7 +214,6 @@ void proc_tty_unregister_driver(struct tty_driver *driver) | |||
214 | */ | 214 | */ |
215 | void __init proc_tty_init(void) | 215 | void __init proc_tty_init(void) |
216 | { | 216 | { |
217 | struct proc_dir_entry *entry; | ||
218 | if (!proc_mkdir("tty", NULL)) | 217 | if (!proc_mkdir("tty", NULL)) |
219 | return; | 218 | return; |
220 | proc_tty_ldisc = proc_mkdir("tty/ldisc", NULL); | 219 | proc_tty_ldisc = proc_mkdir("tty/ldisc", NULL); |
@@ -227,7 +226,5 @@ void __init proc_tty_init(void) | |||
227 | proc_tty_driver = proc_mkdir_mode("tty/driver", S_IRUSR | S_IXUSR, NULL); | 226 | proc_tty_driver = proc_mkdir_mode("tty/driver", S_IRUSR | S_IXUSR, NULL); |
228 | 227 | ||
229 | create_proc_read_entry("tty/ldiscs", 0, NULL, tty_ldiscs_read_proc, NULL); | 228 | create_proc_read_entry("tty/ldiscs", 0, NULL, tty_ldiscs_read_proc, NULL); |
230 | entry = create_proc_entry("tty/drivers", 0, NULL); | 229 | proc_create("tty/drivers", 0, NULL, &proc_tty_drivers_operations); |
231 | if (entry) | ||
232 | entry->proc_fops = &proc_tty_drivers_operations; | ||
233 | } | 230 | } |