diff options
author | Bryan Schumaker <bjschuma@netapp.com> | 2012-07-30 16:05:16 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-07-30 19:04:17 -0400 |
commit | ab7017a3a0a64b953e091619c30413b3721d925d (patch) | |
tree | 1ec947c2794b217d7ead01ee29d8cc5aae4c51f8 /fs/nfs/inode.c | |
parent | a427b9ec4eda8cd6e641ea24541d30b641fc3140 (diff) |
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.c | 9 |
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 @@ | |||
50 | #include "fscache.h" | 50 | #include "fscache.h" |
51 | #include "dns_resolve.h" | 51 | #include "dns_resolve.h" |
52 | #include "pnfs.h" | 52 | #include "pnfs.h" |
53 | #include "nfs.h" | ||
53 | #include "netns.h" | 54 | #include "netns.h" |
54 | 55 | ||
55 | #define NFSDBG_FACILITY NFSDBG_VFS | 56 | #define NFSDBG_FACILITY NFSDBG_VFS |
@@ -1671,21 +1672,17 @@ static int __init init_nfs_fs(void) | |||
1671 | rpc_proc_register(&init_net, &nfs_rpcstat); | 1672 | rpc_proc_register(&init_net, &nfs_rpcstat); |
1672 | #endif | 1673 | #endif |
1673 | 1674 | ||
1674 | #ifdef CONFIG_NFS_V4 | 1675 | err = nfs_register_versions(); |
1675 | err = init_nfs_v4(); | ||
1676 | if (err) | 1676 | if (err) |
1677 | goto out1; | 1677 | goto out1; |
1678 | #endif | ||
1679 | 1678 | ||
1680 | if ((err = register_nfs_fs()) != 0) | 1679 | if ((err = register_nfs_fs()) != 0) |
1681 | goto out0; | 1680 | goto out0; |
1682 | 1681 | ||
1683 | return 0; | 1682 | return 0; |
1684 | out0: | 1683 | out0: |
1685 | #ifdef CONFIG_NFS_V4 | 1684 | nfs_unregister_versions(); |
1686 | exit_nfs_v4(); | ||
1687 | out1: | 1685 | out1: |
1688 | #endif | ||
1689 | #ifdef CONFIG_PROC_FS | 1686 | #ifdef CONFIG_PROC_FS |
1690 | rpc_proc_unregister(&init_net, "nfs"); | 1687 | rpc_proc_unregister(&init_net, "nfs"); |
1691 | #endif | 1688 | #endif |