GIT: unionfs2-2.6.27.y: NFSD: don't report compiled-out versions as present
Erez Zadok
ezk at fsl.cs.sunysb.edu
Thu Aug 12 23:15:26 EDT 2010
commit b9cb946fac3288e7a35571525ef09946e2ba6d7f
Author: Pavel Emelyanov <xemul at openvz.org>
Date: Fri May 14 15:33:36 2010 +0400
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 at openvz.org>
Acked-by: NeilBrown <neilb at suse.de>
Signed-off-by: J. Bruce Fields <bfields at citi.umich.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh at suse.de>
diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
index 80292ff..e02db8e 100644
--- a/fs/nfsd/nfssvc.c
+++ b/fs/nfsd/nfssvc.c
@@ -126,7 +126,7 @@ struct svc_program nfsd_program = {
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];
More information about the unionfs-cvs
mailing list