Linux NFS development
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Jeff Layton <jlayton@primarydata.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH] nfsd: fix return of nfs4_acl_write_who
Date: Wed, 18 Jun 2014 11:42:04 -0400	[thread overview]
Message-ID: <20140618154204.GF17790@fieldses.org> (raw)
In-Reply-To: <1403000048-31245-1-git-send-email-jlayton@primarydata.com>

On Tue, Jun 17, 2014 at 06:14:08AM -0400, Jeff Layton wrote:
> AFAICT, the only way to hit this error is to pass this function a bogus
> "who" value. In that case, we probably don't want to return -1 as that
> could get sent back to the client. Turn this into nfserr_serverfault,
> which is a more appropriate error for a server bug like this.

I don't really care since there shouldn't be any way to hit this, but
OK, applying for 3.17.

--b.

> 
> Signed-off-by: Jeff Layton <jlayton@primarydata.com>
> ---
>  fs/nfsd/nfs4acl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/nfsd/nfs4acl.c b/fs/nfsd/nfs4acl.c
> index d714156a19fd..b0cf00d3ee7d 100644
> --- a/fs/nfsd/nfs4acl.c
> +++ b/fs/nfsd/nfs4acl.c
> @@ -935,5 +935,5 @@ __be32 nfs4_acl_write_who(struct xdr_stream *xdr, int who)
>  		return 0;
>  	}
>  	WARN_ON_ONCE(1);
> -	return -1;
> +	return nfserr_serverfault;
>  }
> -- 
> 1.9.3
> 

  parent reply	other threads:[~2014-06-18 15:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-17 10:14 [PATCH] nfsd: fix return of nfs4_acl_write_who Jeff Layton
2014-06-17 10:28 ` Christoph Hellwig
2014-06-18 15:42 ` J. Bruce Fields [this message]
2014-06-18 16:03   ` Jeff Layton

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=20140618154204.GF17790@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=jlayton@primarydata.com \
    --cc=linux-nfs@vger.kernel.org \
    /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