diff options
author | J. Bruce Fields <bfields@redhat.com> | 2011-08-10 19:16:22 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-11 09:43:15 -0800 |
commit | c86f82f0ef280dfe03d14d46b2265fbc63849efb (patch) | |
tree | 32401b092ff93d209121c7c94c66210f5321dfba /fs/nfsd/nfs4xdr.c | |
parent | ab10f211c7bbb1e5637eb4b31eae6447ff3ddcee (diff) | |
download | lwn-c86f82f0ef280dfe03d14d46b2265fbc63849efb.tar.gz lwn-c86f82f0ef280dfe03d14d46b2265fbc63849efb.zip |
nfsd4: fix seqid_mutating_error
commit 576163005de286bbd418fcb99cfd0971523a0c6d upstream.
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.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/nfsd/nfs4xdr.c')
-rw-r--r-- | fs/nfsd/nfs4xdr.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index c8bf405d19de..f81099605256 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; +} + /* * Routine for encoding the result of a "seqid-mutating" NFSv4 operation. This * is where sequence id's are incremented, and the replay cache is filled. |