[PATCH] nfs: Define nfs4 module alias

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The fact that mount.nfs4 does not find the correct modules to load
(as fs type is nfs4 and that gets probed) seems to be a common
pitfall for quite a bit of time now.
It seems like adding an alias for the nfs4 filesystem type would
be a simple and acceptable (at least ext4 conditionally seems to
do the same) way to fix this. I placed the code into the one file
that already had some module stuff in it.
Does this look like an acceptable change?

-Stefan


>From 1351324afb76bc831eb70f0af3f7a9524047cec0 Mon Sep 17 00:00:00 2001
From: Stefan Bader <stefan.bader@xxxxxxxxxxxxx>
Date: Mon, 28 Nov 2011 15:37:39 +0100
Subject: [PATCH] nfs: Define nfs4 module alias

When NFSv4 is set to be built, the supporting code gets built into the
nfs module. But when trying to mount with fs-type nfs4 the default is
to try to load a module with the same name. Define a module alias to
enable automatic module loading for NFSv4.

Signed-off-by: Stefan Bader <stefan.bader@xxxxxxxxxxxxx>
---
 fs/nfs/inode.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index c07a55a..608069a 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -1653,6 +1653,9 @@ static void __exit exit_nfs_fs(void)
 MODULE_AUTHOR("Olaf Kirch <okir@xxxxxxxxxxxx>");
 MODULE_LICENSE("GPL");
 module_param(enable_ino64, bool, 0644);
+#ifdef CONFIG_NFS_V4
+MODULE_ALIAS("nfs4");
+#endif
 
 module_init(init_nfs_fs)
 module_exit(exit_nfs_fs)
-- 
1.7.5.4

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux