* [PATCH] NFSD: don't report compiled-out versions as present
@ 2010-05-14 11:33 Pavel Emelyanov
2010-05-14 19:03 ` J. Bruce Fields
0 siblings, 1 reply; 3+ messages in thread
From: Pavel Emelyanov @ 2010-05-14 11:33 UTC (permalink / raw)
To: J. Bruce Fields, linux-nfs
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.
Patch is against git://linux-nfs.org/~bfields/linux:master
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
---
diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
index 171699e..06b2a26 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];
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] NFSD: don't report compiled-out versions as present
2010-05-14 11:33 [PATCH] NFSD: don't report compiled-out versions as present Pavel Emelyanov
@ 2010-05-14 19:03 ` J. Bruce Fields
2010-05-14 22:14 ` Neil Brown
0 siblings, 1 reply; 3+ messages in thread
From: J. Bruce Fields @ 2010-05-14 19:03 UTC (permalink / raw)
To: Pavel Emelyanov; +Cc: linux-nfs, NeilBrown
On Fri, May 14, 2010 at 03:33:36PM +0400, Pavel Emelyanov wrote:
> 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.
>
> Patch is against git://linux-nfs.org/~bfields/linux:master
Thanks, applying for 2.6.35 and -stable; looks like this exists since
6658d3a7bbfd1768a7b599def47939417f0ee8ef?
--b.
>
> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
>
> ---
>
> diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
> index 171699e..06b2a26 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];
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] NFSD: don't report compiled-out versions as present
2010-05-14 19:03 ` J. Bruce Fields
@ 2010-05-14 22:14 ` Neil Brown
0 siblings, 0 replies; 3+ messages in thread
From: Neil Brown @ 2010-05-14 22:14 UTC (permalink / raw)
To: J. Bruce Fields; +Cc: Pavel Emelyanov, linux-nfs
On Fri, 14 May 2010 15:03:40 -0400
"J. Bruce Fields" <bfields@citi.umich.edu> wrote:
> On Fri, May 14, 2010 at 03:33:36PM +0400, Pavel Emelyanov wrote:
> > 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.
> >
> > Patch is against git://linux-nfs.org/~bfields/linux:master
>
> Thanks, applying for 2.6.35 and -stable; looks like this exists since
> 6658d3a7bbfd1768a7b599def47939417f0ee8ef?
Ouch-yes :-(
Acked-by: NeilBrown <neilb@suse.de>
NeilBrown
>
> --b.
>
> >
> > Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
> >
> > ---
> >
> > diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
> > index 171699e..06b2a26 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];
> >
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-05-14 22:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-14 11:33 [PATCH] NFSD: don't report compiled-out versions as present Pavel Emelyanov
2010-05-14 19:03 ` J. Bruce Fields
2010-05-14 22:14 ` Neil Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).