aboutsummaryrefslogtreecommitdiff
path: root/include/linux/nfs4.h
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 /include/linux/nfs4.h
parent28dde241cc65c9464b7627d9a9ed3a66e4df2586 (diff)
nfsd4: cleanup and consolidate seqid_mutating_err
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'include/linux/nfs4.h')
-rw-r--r--include/linux/nfs4.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h
index 76f99e8714f..b875b0324fc 100644
--- a/include/linux/nfs4.h
+++ b/include/linux/nfs4.h
@@ -373,6 +373,22 @@ enum nfsstat4 {
NFS4ERR_DELEG_REVOKED = 10087, /* deleg./layout revoked */
};
+static inline bool seqid_mutating_err(u32 err)
+{
+ /* rfc 3530 section 8.1.5: */
+ switch (err) {
+ case NFS4ERR_STALE_CLIENTID:
+ case NFS4ERR_STALE_STATEID:
+ case NFS4ERR_BAD_STATEID:
+ case NFS4ERR_BAD_SEQID:
+ case NFS4ERR_BADXDR:
+ case NFS4ERR_RESOURCE:
+ case NFS4ERR_NOFILEHANDLE:
+ return false;
+ };
+ return true;
+}
+
/*
* Note: NF4BAD is not actually part of the protocol; it is just used
* internally by nfsd.