nfsd: last_byte_offset
authorBenny Halevy <bhalevy@panasas.com>
Mon, 15 Dec 2008 17:42:03 +0000 (19:42 +0200)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Wed, 7 Jan 2009 22:38:31 +0000 (17:38 -0500)
commit87df4de8073f922a1f643b9fa6ba0412d5529ecf
tree8a7e5d7c5d531ac277c2e0026329f589ccdae101
parent4e65ebf08951326709817e654c149d0a94982e01
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>
fs/nfsd/nfs4state.c
include/linux/nfs4.h