• NeilBrown's avatar
    NFSD: fix nfsd_reset_versions for NFSv4. · 800a938f
    NeilBrown authored
    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: default avatarNeilBrown <neilb@suse.com>
    Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
    800a938f
nfssvc.c 20.2 KB