aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4super.c
diff options
context:
space:
mode:
authorBryan Schumaker <bjschuma@netapp.com>2012-07-30 16:05:25 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-07-30 19:06:52 -0400
commit89d77c8fa8e6d1cb7e2cce95b428be30ddcc6f23 (patch)
tree37a076ec2675209fd78bc6ac0474dbecee8d11e7 /fs/nfs/nfs4super.c
parent1c606fb74c758beafd98cbad9a9133eadeec2371 (diff)
NFS: Convert v4 into a module
This patch exports symbols needed by the v4 module. In addition, I also switch over to using IS_ENABLED() to check if CONFIG_NFS_V4 or CONFIG_NFS_V4_MODULE are set. The module (nfs4.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 v4. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4super.c')
-rw-r--r--fs/nfs/nfs4super.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/nfs/nfs4super.c b/fs/nfs/nfs4super.c
index 1c825f3bef51..12a31a9dbcdd 100644
--- a/fs/nfs/nfs4super.c
+++ b/fs/nfs/nfs4super.c
@@ -332,7 +332,7 @@ static struct dentry *nfs4_referral_mount(struct file_system_type *fs_type,
332} 332}
333 333
334 334
335int __init init_nfs_v4(void) 335static int __init init_nfs_v4(void)
336{ 336{
337 int err; 337 int err;
338 338
@@ -358,10 +358,15 @@ out:
358 return err; 358 return err;
359} 359}
360 360
361void exit_nfs_v4(void) 361static void __exit exit_nfs_v4(void)
362{ 362{
363 unregister_nfs_version(&nfs_v4); 363 unregister_nfs_version(&nfs_v4);
364 unregister_filesystem(&nfs4_fs_type); 364 unregister_filesystem(&nfs4_fs_type);
365 nfs4_unregister_sysctl(); 365 nfs4_unregister_sysctl();
366 nfs_idmap_quit(); 366 nfs_idmap_quit();
367} 367}
368
369MODULE_LICENSE("GPL");
370
371module_init(init_nfs_v4);
372module_exit(exit_nfs_v4);