Re: [PATCH] nfsd4: fix seqid_mutating_error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2011-08-19 at 13:24 -0400, J. Bruce Fields wrote: 
> Yipes--noticed while doing some unrelated v4 state work.  I'll probably
> send this along soonish.
> 
> --b.
> 
> commit 8eea0f78ed3f3238e238c8ca76e5c7a5c1e7b5f5
> Author: J. Bruce Fields <bfields@xxxxxxxxxx>
> Date:   Wed Aug 10 19:16:22 2011 -0400
> 
>     nfsd4: fix seqid_mutating_error
>     
>     The set of errors here does *not* agree with the set of errors specified
>     in the rfc!
>     
>     While we're there, turn this macros into a function, for the usual
>     reasons, and move it to the one place where it's actually used.
>     
>     Cc: stable@xxxxxxxxxx
>     Signed-off-by: J. Bruce Fields <bfields@xxxxxxxxxx>
> 
> diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
> index c8bf405..f810996 100644
> --- a/fs/nfsd/nfs4xdr.c
> +++ b/fs/nfsd/nfs4xdr.c
> @@ -1623,6 +1623,18 @@ static void write_cinfo(__be32 **p, struct nfsd4_change_info *c)
>  								\
>  	save = resp->p;
>  
> +static bool seqid_mutating_err(__be32 err)
> +{
> +	/* rfc 3530 section 8.1.5: */
> +	return	err != nfserr_stale_clientid &&
> +		err != nfserr_stale_stateid &&
> +		err != nfserr_bad_stateid &&
> +		err != nfserr_bad_seqid &&
> +		err != nfserr_bad_xdr &&
> +		err != nfserr_resource &&
> +		err != nfserr_nofilehandle;

Any reason not to convert the above into a switch() statement while you
are at it?

Trond
-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@xxxxxxxxxx
www.netapp.com

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux