summaryrefslogtreecommitdiffstats
path: root/fs/nfs/inode.c
diff options
context:
space:
mode:
authorBryan Schumaker2012-07-30 22:05:16 +0200
committerTrond Myklebust2012-07-31 01:04:17 +0200
commitab7017a3a0a64b953e091619c30413b3721d925d (patch)
tree1ec947c2794b217d7ead01ee29d8cc5aae4c51f8 /fs/nfs/inode.c
parentNFS: Fix a number of bugs in the idmapper (diff)
downloadkernel-qcow2-linux-ab7017a3a0a64b953e091619c30413b3721d925d.tar.gz
kernel-qcow2-linux-ab7017a3a0a64b953e091619c30413b3721d925d.tar.xz
kernel-qcow2-linux-ab7017a3a0a64b953e091619c30413b3721d925d.zip
NFS: Add version registering framework
This patch adds in the code to track multiple versions of the NFS protocol. I created default structures for v2, v3 and v4 so that each version can continue to work while I convert them into kernel modules. I also removed the const parameter from the rpc_version array so that I can change it at runtime. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/inode.c')
-rw-r--r--fs/nfs/inode.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 35f7e4bc680e..e8877c82582d 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -50,6 +50,7 @@
#include "fscache.h"
#include "dns_resolve.h"
#include "pnfs.h"
+#include "nfs.h"
#include "netns.h"
#define NFSDBG_FACILITY NFSDBG_VFS
@@ -1671,21 +1672,17 @@ static int __init init_nfs_fs(void)
rpc_proc_register(&init_net, &nfs_rpcstat);
#endif
-#ifdef CONFIG_NFS_V4
- err = init_nfs_v4();
+ err = nfs_register_versions();
if (err)
goto out1;
-#endif
if ((err = register_nfs_fs()) != 0)
goto out0;
return 0;
out0:
-#ifdef CONFIG_NFS_V4
- exit_nfs_v4();
+ nfs_unregister_versions();
out1:
-#endif
#ifdef CONFIG_PROC_FS
rpc_proc_unregister(&init_net, "nfs");
#endif