summaryrefslogtreecommitdiff
path: root/fs/filesystems.c
diff options
context:
space:
mode:
authorAlexander Viro <viro@math.psu.edu>2002-03-14 23:06:06 -0800
committerLinus Torvalds <torvalds@home.transmeta.com>2002-03-14 23:06:06 -0800
commit063b009f71b9ab15e25b1e63d95a7e65b0122ff8 (patch)
treef22dc0311c083db1e0eb0c5ff9630f9adf3b5719 /fs/filesystems.c
parentedb1bea52033decaf2611da116ca766fc8579cda (diff)
[PATCH] nfsd as filesystem
* introduces a new filesystem - nfsd. No, it's not a typo. It's a small tree with fixed topology defined by nfsd and IO on its files does what we used to do by hand in nfsctl.c. * turns sys_nfsservctl() into a sequence of open()/write()/read()/close() It works as it used to - we don't need nfsd to be mounted anywhere, etc. * nfsd_linkage ugliness is gone. * getfs and getfh demonstrate (rather trivial) example of "descriptor as transaction descriptor" behaviour. * we are fairly close to the situation when driver-defined filesystems can be done with practically zero code overhead. We are still not there, but it's a matter of adding a couple of helpers for populating the tree. One thing we get immediately is a cleanup of sys_nfsservctl() - it got _much_ better. Moreover, we get an alternative interface that uses normal file IO and can be used without magic syscalls.
Diffstat (limited to 'fs/filesystems.c')
-rw-r--r--fs/filesystems.c39
1 files changed, 5 insertions, 34 deletions
diff --git a/fs/filesystems.c b/fs/filesystems.c
index a465ff2dc0bf..76eda773d051 100644
--- a/fs/filesystems.c
+++ b/fs/filesystems.c
@@ -3,39 +3,10 @@
*
* Copyright (C) 1991, 1992 Linus Torvalds
*
- * nfsservctl system-call when nfsd is not compiled in.
+ * table of configured filesystems
*/
-#include <linux/config.h>
-#include <linux/module.h>
-#include <linux/time.h>
-#include <linux/smp_lock.h>
-#include <linux/kmod.h>
-#include <linux/nfsd/interface.h>
-#include <linux/linkage.h>
-
-#if ! defined(CONFIG_NFSD)
-struct nfsd_linkage *nfsd_linkage;
-
-long
-asmlinkage sys_nfsservctl(int cmd, void *argp, void *resp)
-{
- int ret = -ENOSYS;
-
-#if defined(CONFIG_MODULES)
- lock_kernel();
-
- if (nfsd_linkage ||
- (request_module ("nfsd") == 0 && nfsd_linkage)) {
- __MOD_INC_USE_COUNT(nfsd_linkage->owner);
- unlock_kernel();
- ret = nfsd_linkage->do_nfsservctl(cmd, argp, resp);
- __MOD_DEC_USE_COUNT(nfsd_linkage->owner);
- } else
- unlock_kernel();
-#endif
- return ret;
-}
-EXPORT_SYMBOL(nfsd_linkage);
-
-#endif /* CONFIG_NFSD */
+/*
+ * Code will move here from fs/super.c and yes, it will be fs type handling
+ * stuff.
+ */