summaryrefslogtreecommitdiff
path: root/include/linux/nfs4.h
diff options
context:
space:
mode:
authorBenny Halevy <bhalevy@panasas.com>2008-12-15 19:42:03 +0200
committerJ. Bruce Fields <bfields@citi.umich.edu>2009-01-07 17:38:31 -0500
commit87df4de8073f922a1f643b9fa6ba0412d5529ecf (patch)
tree8a7e5d7c5d531ac277c2e0026329f589ccdae101 /include/linux/nfs4.h
parent4e65ebf08951326709817e654c149d0a94982e01 (diff)
nfsd: last_byte_offset
refactor the nfs4 server lock code to use last_byte_offset to compute the last byte covered by the lock. Check for overflow so that the last byte is set to NFS4_MAX_UINT64 if offset + len wraps around. Also, use NFS4_MAX_UINT64 for ~(u64)0 where appropriate. Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'include/linux/nfs4.h')
-rw-r--r--include/linux/nfs4.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/nfs4.h b/include/linux/nfs4.h
index ea0366769484..b912311a56b1 100644
--- a/include/linux/nfs4.h
+++ b/include/linux/nfs4.h
@@ -88,6 +88,8 @@
#define NFS4_ACE_GENERIC_EXECUTE 0x001200A0
#define NFS4_ACE_MASK_ALL 0x001F01FF
+#define NFS4_MAX_UINT64 (~(u64)0)
+
enum nfs4_acl_whotype {
NFS4_ACL_WHO_NAMED = 0,
NFS4_ACL_WHO_OWNER,