linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: NeilBrown <neilb@suse.com>
Cc: Trond Myklebust <trondmy@primarydata.com>, linux-nfs@vger.kernel.org
Subject: Re: [PATCH 2/3] NFSD: fix nfsd_minorversion(.., NFSD_AVAIL)
Date: Fri, 10 Mar 2017 17:26:24 -0500	[thread overview]
Message-ID: <20170310222624.GO29791@fieldses.org> (raw)
In-Reply-To: <20170310221648.GN29791@fieldses.org>

On Fri, Mar 10, 2017 at 05:16:48PM -0500, J. Bruce Fields wrote:
> On Fri, Mar 10, 2017 at 11:36:39AM +1100, NeilBrown wrote:
> > Current code will return 1 if the version is supported,
> > and -1 if it isn't.
> > This is confusing and inconsistent with the one place where this
> > is used.
> 
> It's used?  I don't see it.--b.

But, whatever, I'm OK with it.

I'll queue all three up for 4.11 absent any objection.

--b.

> 
> > So change to return 1 if it is supported, and zero if not.
> > i.e. an error is never returned.
> > 
> > Signed-off-by: NeilBrown <neilb@suse.com>
> > ---
> >  fs/nfsd/nfssvc.c |    3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c
> > index 786a4a2cb2d7..892137b1e330 100644
> > --- a/fs/nfsd/nfssvc.c
> > +++ b/fs/nfsd/nfssvc.c
> > @@ -167,7 +167,8 @@ nfsd_adjust_nfsd_versions4(void)
> >  
> >  int nfsd_minorversion(u32 minorversion, enum vers_op change)
> >  {
> > -	if (minorversion > NFSD_SUPPORTED_MINOR_VERSION)
> > +	if (minorversion > NFSD_SUPPORTED_MINOR_VERSION &&
> > +	    change != NFSD_AVAIL)
> >  		return -1;
> >  	switch(change) {
> >  	case NFSD_SET:
> > 

  reply	other threads:[~2017-03-10 22:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-10  0:36 [PATCH 0/3] NFSD: Various fixes for the 'versions' file NeilBrown
2017-03-10  0:36 ` [PATCH 2/3] NFSD: fix nfsd_minorversion(.., NFSD_AVAIL) NeilBrown
2017-03-10 22:16   ` J. Bruce Fields
2017-03-10 22:26     ` J. Bruce Fields [this message]
2017-03-12 21:58     ` NeilBrown
2017-03-10  0:36 ` [PATCH 1/3] NFSD: further refinement of content of /proc/fs/nfsd/versions NeilBrown
2017-03-10  0:36 ` [PATCH 3/3] NFSD: fix nfsd_reset_versions for NFSv4 NeilBrown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170310222624.GO29791@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.com \
    --cc=trondmy@primarydata.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).