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>
This commit is contained in:

committed by
J. Bruce Fields

parent
4e65ebf089
commit
87df4de807
@@ -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,
|
||||
|
Reference in New Issue
Block a user