NFS4: remove a redundant lock range check
authorBenjamin Coddington <bcodding@redhat.com>
Tue, 11 Apr 2017 16:50:07 +0000 (12:50 -0400)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Fri, 21 Apr 2017 14:45:00 +0000 (10:45 -0400)
flock64_to_posix_lock() is already doing this check

Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Reviewed-by: Jeff Layton <jeff.layton@primarydata.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/nfs4proc.c

index 6e9ff2d9a5bf5cf7db104e1e952a12c3e823834d..d682ef3b2da260d06468229046c3e0b233a1ec17 100644 (file)
@@ -6447,9 +6447,6 @@ nfs4_proc_lock(struct file *filp, int cmd, struct file_lock *request)
        ctx = nfs_file_open_context(filp);
        state = ctx->state;
 
-       if (request->fl_start < 0 || request->fl_end < 0)
-               return -EINVAL;
-
        if (IS_GETLK(cmd)) {
                if (state != NULL)
                        return nfs4_proc_getlk(state, F_GETLK, request);