@@ -241,8 +241,19 @@ static void nfsd_shutdown_generic(void)
nfsd_file_cache_shutdown();
}
+/*
+ * Allow admin to disable lockd. This would typically be used to allow (e.g.)
+ * a userspace NLM server of some sort to be used.
+ */
+static bool nfsd_disable_lockd = false;
+module_param(nfsd_disable_lockd, bool, 0644);
+MODULE_PARM_DESC(nfsd_disable_lockd, "Allow lockd to be manually disabled.");
+
static bool nfsd_needs_lockd(void)
{
+ if (nfsd_disable_lockd)
+ return false;
+
#if defined(CONFIG_NFSD_V3)
return (nfsd_versions[2] != NULL) || (nfsd_versions[3] != NULL);
#else
In some cases, we may want to use a userland NLM server which will require that we turn off lockd. Signed-off-by: Jeff Layton <jeff.layton@primarydata.com> --- fs/nfsd/nfssvc.c | 11 +++++++++++ 1 file changed, 11 insertions(+)