1
2
3
4
5
6
7
8
9#include <linux/config.h>
10#include <linux/fs.h>
11
12#include <linux/minix_fs.h>
13#include <linux/ext2_fs.h>
14#include <linux/msdos_fs.h>
15#include <linux/umsdos_fs.h>
16#include <linux/proc_fs.h>
17#include <linux/nfs_fs.h>
18#include <linux/iso_fs.h>
19#include <linux/sysv_fs.h>
20#include <linux/hpfs_fs.h>
21#include <linux/smb_fs.h>
22#include <linux/ncp_fs.h>
23#include <linux/affs_fs.h>
24#include <linux/ufs_fs.h>
25#include <linux/efs_fs.h>
26#include <linux/romfs_fs.h>
27#include <linux/auto_fs.h>
28#include <linux/qnx4_fs.h>
29#include <linux/ntfs_fs.h>
30#include <linux/hfs_fs.h>
31#include <linux/devpts_fs.h>
32#include <linux/major.h>
33#include <linux/smp.h>
34#include <linux/smp_lock.h>
35#ifdef CONFIG_KMOD
36#include <linux/kmod.h>
37#endif
38#include <linux/lockd/bind.h>
39#include <linux/lockd/xdr.h>
40#include <linux/lockd/syscall.h>
41#include <linux/init.h>
42#include <linux/nls.h>
43
44#ifdef CONFIG_CODA_FS
45extern int init_coda(void);
46#endif
47
48#ifdef CONFIG_DEVPTS_FS
49extern int init_devpts_fs(void);
50#endif
51
52extern int init_adfs_fs(void);
53
54
55void __init filesystem_setup(void)
56{
57#ifdef CONFIG_EXT2_FS
58 init_ext2_fs();
59#endif
60
61#ifdef CONFIG_MINIX_FS
62 init_minix_fs();
63#endif
64
65#ifdef CONFIG_ROMFS_FS
66 init_romfs_fs();
67#endif
68
69#ifdef CONFIG_UMSDOS_FS
70 init_umsdos_fs();
71#endif
72
73#ifdef CONFIG_FAT_FS
74 init_fat_fs();
75#endif
76
77#ifdef CONFIG_MSDOS_FS
78 init_msdos_fs();
79#endif
80
81#ifdef CONFIG_VFAT_FS
82 init_vfat_fs();
83#endif
84
85#ifdef CONFIG_PROC_FS
86 init_proc_fs();
87#endif
88
89#ifdef CONFIG_LOCKD
90 nlmxdr_init();
91#endif
92
93#ifdef CONFIG_NFS_FS
94 init_nfs_fs();
95#endif
96
97#ifdef CONFIG_CODA_FS
98 init_coda();
99#endif
100
101#ifdef CONFIG_SMB_FS
102 init_smb_fs();
103#endif
104
105#ifdef CONFIG_NCP_FS
106 init_ncp_fs();
107#endif
108
109#ifdef CONFIG_ISO9660_FS
110 init_iso9660_fs();
111#endif
112
113#ifdef CONFIG_SYSV_FS
114 init_sysv_fs();
115#endif
116
117#ifdef CONFIG_HPFS_FS
118 init_hpfs_fs();
119#endif
120
121#ifdef CONFIG_NTFS_FS
122 init_ntfs_fs();
123#endif
124
125#ifdef CONFIG_HFS_FS
126 init_hfs_fs();
127#endif
128
129#ifdef CONFIG_AFFS_FS
130 init_affs_fs();
131#endif
132
133#ifdef CONFIG_UFS_FS
134 init_ufs_fs();
135#endif
136
137#ifdef CONFIG_EFS_FS
138 init_efs_fs();
139#endif
140
141#ifdef CONFIG_AUTOFS_FS
142 init_autofs_fs();
143#endif
144
145#ifdef CONFIG_ADFS_FS
146 init_adfs_fs();
147#endif
148
149#ifdef CONFIG_DEVPTS_FS
150 init_devpts_fs();
151#endif
152
153#ifdef CONFIG_QNX4FS_FS
154 init_qnx4_fs();
155#endif
156
157#ifdef CONFIG_NLS
158 init_nls();
159#endif
160}
161
162#ifndef CONFIG_NFSD
163#ifdef CONFIG_NFSD_MODULE
164int (*do_nfsservctl)(int, void *, void *) = NULL;
165#endif
166
167#ifdef CONFIG_LOCKD_MODULE
168int (*do_lockdctl)(int, void *, void *) = NULL;
169#endif
170
171int
172asmlinkage sys_nfsservctl(int cmd, void *argp, void *resp)
173{
174 int ret = -ENOSYS;
175
176 if (cmd >= NFSCTL_LOCKD) {
177#if defined(CONFIG_LOCKD) || defined(CONFIG_LOCKD_MODULE)
178 lock_kernel();
179#ifdef CONFIG_LOCKD
180 ret = lockdctl(cmd, argp, resp);
181#else
182 if (do_lockdctl)
183 ret = do_lockdctl(cmd, argp, resp);
184#ifdef CONFIG_KMOD
185 else if (request_module ("lockd") == 0) {
186 if (do_lockdctl)
187 ret = do_lockdctl(cmd, argp, resp);
188 }
189#endif
190#endif
191 unlock_kernel();
192#endif
193 return ret;
194 }
195
196#ifdef CONFIG_NFSD_MODULE
197 lock_kernel();
198 if (do_nfsservctl)
199 ret = do_nfsservctl(cmd, argp, resp);
200#ifdef CONFIG_KMOD
201 else if (request_module ("nfsd") == 0) {
202 if (do_nfsservctl)
203 ret = do_nfsservctl(cmd, argp, resp);
204 }
205#endif
206 unlock_kernel();
207#endif
208 return ret;
209}
210#endif
211