]> www.infradead.org Git - users/dwmw2/linux.git/commit
nfsd: allow disabling NFSv2 at compile time
authorJeff Layton <jlayton@kernel.org>
Tue, 18 Oct 2022 11:47:56 +0000 (07:47 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Apr 2024 14:19:21 +0000 (16:19 +0200)
commit10d55a17899a27100c6b1a6987e2ab6774c096a1
tree8e7e1a8516f5dc40447a780f4146852830f4305f
parent4d1fa40d54ae85a34a9ddc2f600aff1e5693d338
nfsd: allow disabling NFSv2 at compile time

[ Upstream commit 2f3a4b2ac2f28b9be78ad21f401f31e263845214 ]

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>
fs/nfsd/Kconfig
fs/nfsd/Makefile
fs/nfsd/nfsctl.c
fs/nfsd/nfsd.h
fs/nfsd/nfssvc.c