summaryrefslogtreecommitdiff
path: root/fs/nfsd/nfsd.h
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2022-10-18 07:47:56 -0400
committerChuck Lever <chuck.lever@oracle.com>2022-11-28 12:54:45 -0500
commit2f3a4b2ac2f28b9be78ad21f401f31e263845214 (patch)
tree3cca66ebd6f33a024cc83919383a50f1af58c889 /fs/nfsd/nfsd.h
parentcb12fae1c34b1fa7eaae92c5aadc72d86d7fae19 (diff)
nfsd: allow disabling NFSv2 at compile time
rpc.nfsd stopped supporting NFSv2 a year ago. Take the next logical step toward deprecating it and allow NFSv2 support to be compiled out. Add a new CONFIG_NFSD_V2 option that can be turned off and rework the CONFIG_NFSD_V?_ACL option dependencies. Add a description that discourages enabling it. Also, change the description of CONFIG_NFSD to state that the always-on version is now 3 instead of 2. Finally, add an #ifdef around "case 2:" in __write_versions. When NFSv2 is disabled at compile time, this should make the kernel ignore attempts to disable it at runtime, but still error out when trying to enable it. Signed-off-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Tom Talpey <tom@talpey.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/nfsd/nfsd.h')
-rw-r--r--fs/nfsd/nfsd.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/nfsd/nfsd.h b/fs/nfsd/nfsd.h
index 09726c5b9a31..93b42ef9ed91 100644
--- a/fs/nfsd/nfsd.h
+++ b/fs/nfsd/nfsd.h
@@ -64,8 +64,7 @@ struct readdir_cd {
extern struct svc_program nfsd_program;
-extern const struct svc_version nfsd_version2, nfsd_version3,
- nfsd_version4;
+extern const struct svc_version nfsd_version2, nfsd_version3, nfsd_version4;
extern struct mutex nfsd_mutex;
extern spinlock_t nfsd_drc_lock;
extern unsigned long nfsd_drc_max_mem;