summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorKinglong Mee <kinglongmee@gmail.com>2015-07-13 11:34:19 +0200
committerJ. Bruce Fields <bfields@redhat.com>2015-08-10 22:05:52 +0200
commite7969315f472aeddf39d6db34cc3f6bf3316fd62 (patch)
tree6bec9c2a37a267e814610414b795556b92530c8b /fs
parentnfsd: Remove duplicate checking of nfsd_net in nfs4_laundromat() (diff)
downloadlinux-e7969315f472aeddf39d6db34cc3f6bf3316fd62.tar.xz
linux-e7969315f472aeddf39d6db34cc3f6bf3316fd62.zip
nfsd: Remove macro LOFF_OVERFLOW
Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfsd/nfs4state.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 433355d46794..74eb8c2e13a0 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -5045,9 +5045,6 @@ out:
return status;
}
-
-#define LOFF_OVERFLOW(start, len) ((u64)(len) > ~(u64)(start))
-
static inline u64
end_offset(u64 start, u64 len)
{
@@ -5299,8 +5296,8 @@ find_or_create_lock_stateid(struct nfs4_lockowner *lo, struct nfs4_file *fi,
static int
check_lock_length(u64 offset, u64 length)
{
- return ((length == 0) || ((length != NFS4_MAX_UINT64) &&
- LOFF_OVERFLOW(offset, length)));
+ return ((length == 0) || ((length != NFS4_MAX_UINT64) &&
+ (length > ~offset)));
}
static void get_lock_access(struct nfs4_ol_stateid *lock_stp, u32 access)