]> git.baikalelectronics.ru Git - kernel.git/commit
NFSD: fix nfsd_reset_versions for NFSv4.
authorNeilBrown <neilb@suse.com>
Fri, 10 Mar 2017 00:36:39 +0000 (11:36 +1100)
committerJ. Bruce Fields <bfields@redhat.com>
Fri, 10 Mar 2017 22:04:50 +0000 (17:04 -0500)
commit26d7518a29f2b3863d509d570d9478b7b46431f1
tree6c490aba399eaf0db00f939de56519f20c8363c6
parent955d633a8ef61c1df7cdadc730bf625681863d86
NFSD: fix nfsd_reset_versions for NFSv4.

If you write "-2 -3 -4" to the "versions" file, it will
notice that no versions are enabled, and nfsd_reset_versions()
is called.
This enables all major versions, not no minor versions.
So we lose the invariant that NFSv4 is only advertised when
at least one minor is enabled.

Fix the code to explicitly enable minor versions for v4,
change it to use nfsd_vers() to test and set, and simplify
the code.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfssvc.c