aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/super.c
diff options
context:
space:
mode:
authorBryan Schumaker <bjschuma@netapp.com>2012-07-30 16:05:24 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-07-30 19:06:46 -0400
commit1c606fb74c758beafd98cbad9a9133eadeec2371 (patch)
treee8c057f32df3ee0a8e0341ae4ef2b23809a83da3 /fs/nfs/super.c
parentddda8e0aa8b955e20cb80908189bfa154ab54837 (diff)
NFS: Convert v3 into a module
This patch exports symbols and moves over the final structures needed by the v3 module. In addition, I also switch over to using IS_ENABLED() to check if CONFIG_NFS_V3 or CONFIG_NFS_V3_MODULE are set. The module (nfs3.ko) will be created in the same directory as nfs.ko and will be automatically loaded the first time you try to mount over NFS v3. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/super.c')
-rw-r--r--fs/nfs/super.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 999ce750514..558a85c9594 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -69,7 +69,7 @@
69#define NFSDBG_FACILITY NFSDBG_VFS 69#define NFSDBG_FACILITY NFSDBG_VFS
70#define NFS_TEXT_DATA 1 70#define NFS_TEXT_DATA 1
71 71
72#ifdef CONFIG_NFS_V3 72#if IS_ENABLED(CONFIG_NFS_V3)
73#define NFS_DEFAULT_VERSION 3 73#define NFS_DEFAULT_VERSION 3
74#else 74#else
75#define NFS_DEFAULT_VERSION 2 75#define NFS_DEFAULT_VERSION 2
@@ -1876,7 +1876,7 @@ static int nfs23_validate_mount_data(void *options,
1876 return NFS_TEXT_DATA; 1876 return NFS_TEXT_DATA;
1877 } 1877 }
1878 1878
1879#ifndef CONFIG_NFS_V3 1879#if !IS_ENABLED(CONFIG_NFS_V3)
1880 if (args->version == 3) 1880 if (args->version == 3)
1881 goto out_v3_not_compiled; 1881 goto out_v3_not_compiled;
1882#endif /* !CONFIG_NFS_V3 */ 1882#endif /* !CONFIG_NFS_V3 */
@@ -1896,7 +1896,7 @@ out_no_sec:
1896 dfprintk(MOUNT, "NFS: nfs_mount_data version supports only AUTH_SYS\n"); 1896 dfprintk(MOUNT, "NFS: nfs_mount_data version supports only AUTH_SYS\n");
1897 return -EINVAL; 1897 return -EINVAL;
1898 1898
1899#ifndef CONFIG_NFS_V3 1899#if !IS_ENABLED(CONFIG_NFS_V3)
1900out_v3_not_compiled: 1900out_v3_not_compiled:
1901 dfprintk(MOUNT, "NFS: NFSv3 is not compiled into kernel\n"); 1901 dfprintk(MOUNT, "NFS: NFSv3 is not compiled into kernel\n");
1902 return -EPROTONOSUPPORT; 1902 return -EPROTONOSUPPORT;