diff options
author | Pavel Emelyanov <xemul@openvz.org> | 2010-05-14 15:33:36 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-07-05 11:15:31 -0700 |
commit | 5d121956703ea2e5ab9f73c48e225cbccbc9d9b6 (patch) | |
tree | f78ede20a77d827dcb3925928e4b54e23cfb836b | |
parent | 98410fc32c3d9f983860691a1de2d9b8bd3fe5ee (diff) | |
download | kernel-crypto-5d121956703ea2e5ab9f73c48e225cbccbc9d9b6.tar.gz kernel-crypto-5d121956703ea2e5ab9f73c48e225cbccbc9d9b6.tar.xz kernel-crypto-5d121956703ea2e5ab9f73c48e225cbccbc9d9b6.zip |
NFSD: don't report compiled-out versions as present
commit 15ddb4aec54422ead137b03ea4e9b3f5db3f7cc2 upstream.
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 since 6658d3a7bbfd1768 "[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>
-rw-r--r-- | fs/nfsd/nfssvc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c index 171699eb07c..06b2a26edfe 100644 --- a/fs/nfsd/nfssvc.c +++ b/fs/nfsd/nfssvc.c @@ -120,7 +120,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]; |