Skip to contentSkip to conversation

NLM: LOCKD fails to load if CONFIG_SYSCTL is not set

PATCH In review Chuck Lever 1 participant 1 message Feb 8, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 11/11 NLM: LOCKD fails to load if CONFIG_SYSCTL is not set

By the way, we've got another config-related nit here:

	http://bugzilla.linux-nfs.org/show_bug.cgi?id=156

You can build lockd without CONFIG_SYSCTL set, but then the module will fail to load.

---

 fs/Kconfig     |    1 +
 fs/lockd/svc.c |    4 ++++
 2 files changed, 5 insertions(+), 0 deletions(-)
fs/Kconfig +1 -0
index f799964..b7aeed4 100644
@@ -1734,6 +1734,7 @@ config NFSD_V4
 
 config LOCKD
 	tristate
+	select SYSCTL
 
 config LOCKD_V4
 	bool
fs/lockd/svc.c +4 -0
index 0822646..adb8e2c 100644
@@ -516,8 +516,12 @@ module_param(nsm_use_hostnames, bool, 0644);
 
 static int __init init_nlm(void)
 {
+#if CONFIG_SYSCTL
 	nlm_sysctl_table = register_sysctl_table(nlm_sysctl_root);
 	return nlm_sysctl_table ? 0 : -ENOMEM;
+#else
+	return 0;
+#endif
 }
 
 static void __exit exit_nlm(void)