aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2011-08-23 15:43:04 -0400
committerJ. Bruce Fields <bfields@redhat.com>2011-08-27 14:21:26 -0400
commita9004abc34239705840eaf6fe3d6cc9cb7656cba (patch)
tree98393ed5b30ed4d789485938ad52116eb15c7f65 /fs/nfsd
parent28dde241cc65c9464b7627d9a9ed3a66e4df2586 (diff)
nfsd4: cleanup and consolidate seqid_mutating_err
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfs4xdr.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index 78c792fb59a8..04ad9a2ca3d0 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -1623,18 +1623,6 @@ static void write_cinfo(__be32 **p, struct nfsd4_change_info *c)
1623 \ 1623 \
1624 save = resp->p; 1624 save = resp->p;
1625 1625
1626static bool seqid_mutating_err(__be32 err)
1627{
1628 /* rfc 3530 section 8.1.5: */
1629 return err != nfserr_stale_clientid &&
1630 err != nfserr_stale_stateid &&
1631 err != nfserr_bad_stateid &&
1632 err != nfserr_bad_seqid &&
1633 err != nfserr_bad_xdr &&
1634 err != nfserr_resource &&
1635 err != nfserr_nofilehandle;
1636}
1637
1638/* 1626/*
1639 * Routine for encoding the result of a "seqid-mutating" NFSv4 operation. This 1627 * Routine for encoding the result of a "seqid-mutating" NFSv4 operation. This
1640 * is where sequence id's are incremented, and the replay cache is filled. 1628 * is where sequence id's are incremented, and the replay cache is filled.
@@ -1643,7 +1631,7 @@ static bool seqid_mutating_err(__be32 err)
1643 */ 1631 */
1644 1632
1645#define ENCODE_SEQID_OP_TAIL(stateowner) do { \ 1633#define ENCODE_SEQID_OP_TAIL(stateowner) do { \
1646 if (seqid_mutating_err(nfserr) && stateowner) { \ 1634 if (seqid_mutating_err(ntohl(nfserr)) && stateowner) { \
1647 stateowner->so_seqid++; \ 1635 stateowner->so_seqid++; \
1648 stateowner->so_replay.rp_status = nfserr; \ 1636 stateowner->so_replay.rp_status = nfserr; \
1649 stateowner->so_replay.rp_buflen = \ 1637 stateowner->so_replay.rp_buflen = \