mirror of
https://github.com/torvalds/linux.git
synced 2026-06-08 22:52:35 +02:00
NFSD: don't report compiled-out versions as present
commit15ddb4aec5upstream. The /proc/fs/nfsd/versions file calls nfsd_vers() to check whether the particular nfsd version is present/available. The problem is that once I turn off e.g. NFSD-V4 this call returns -1 which is true from the callers POV which is wrong. The proposal is to report false in that case. The bug has existed since6658d3a7bb"[PATCH] knfsd: remove nfsd_versbits as intermediate storage for desired versions". Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Acked-by: NeilBrown <neilb@suse.de> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
ab871d83d4
commit
d700d27176
|
|
@ -136,7 +136,7 @@ u32 nfsd_supported_minorversion;
|
|||
int nfsd_vers(int vers, enum vers_op change)
|
||||
{
|
||||
if (vers < NFSD_MINVERS || vers >= NFSD_NRVERS)
|
||||
return -1;
|
||||
return 0;
|
||||
switch(change) {
|
||||
case NFSD_SET:
|
||||
nfsd_versions[vers] = nfsd_version[vers];
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user