mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 13:44:26 -04:00
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:
parent
4e65ebf089
commit
87df4de807
2 changed files with 28 additions and 16 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue