Fix reported Samba bug.
[linux-2.6/linux-mips.git] / fs / filesystems.c
blobe57b7b3df0f522426b62cd680c32df9610f8eef3
1 /*
2 * linux/fs/filesystems.c
4 * Copyright (C) 1991, 1992 Linus Torvalds
6 * table of configured filesystems
7 */
9 #include <linux/config.h>
10 #include <linux/fs.h>
12 #include <linux/devfs_fs_kernel.h>
13 #include <linux/nfs_fs.h>
14 #include <linux/auto_fs.h>
15 #include <linux/devpts_fs.h>
16 #include <linux/major.h>
17 #include <linux/smp.h>
18 #include <linux/smp_lock.h>
19 #ifdef CONFIG_KMOD
20 #include <linux/kmod.h>
21 #endif
22 #include <linux/lockd/bind.h>
23 #include <linux/lockd/xdr.h>
24 #include <linux/init.h>
26 #ifdef CONFIG_CODA_FS
27 extern int init_coda(void);
28 #endif
30 #ifdef CONFIG_DEVPTS_FS
31 extern int init_devpts_fs(void);
32 #endif
34 void __init filesystem_setup(void)
36 init_devfs_fs(); /* Header file may make this empty */
38 #ifdef CONFIG_NFS_FS
39 init_nfs_fs();
40 #endif
42 #ifdef CONFIG_CODA_FS
43 init_coda();
44 #endif
46 #ifdef CONFIG_DEVPTS_FS
47 init_devpts_fs();
48 #endif
51 #ifndef CONFIG_NFSD
52 #ifdef CONFIG_NFSD_MODULE
53 long (*do_nfsservctl)(int, void *, void *);
54 #endif
55 long
56 asmlinkage sys_nfsservctl(int cmd, void *argp, void *resp)
58 #ifndef CONFIG_NFSD_MODULE
59 return -ENOSYS;
60 #else
61 int ret = -ENOSYS;
63 lock_kernel();
64 if (do_nfsservctl) {
65 ret = do_nfsservctl(cmd, argp, resp);
66 goto out;
68 #ifdef CONFIG_KMOD
69 if (request_module ("nfsd") == 0) {
70 if (do_nfsservctl)
71 ret = do_nfsservctl(cmd, argp, resp);
73 #endif /* CONFIG_KMOD */
74 out:
75 unlock_kernel();
76 return ret;
77 #endif /* CONFIG_NFSD_MODULE */
79 #endif /* CONFIG_NFSD */