From patchwork Wed Dec 30 13:13:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Coddington X-Patchwork-Id: 7933041 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 078B09F387 for ; Wed, 30 Dec 2015 13:14:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 46335202F2 for ; Wed, 30 Dec 2015 13:14:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 325E020172 for ; Wed, 30 Dec 2015 13:14:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754751AbbL3NOK (ORCPT ); Wed, 30 Dec 2015 08:14:10 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43641 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754750AbbL3NOI (ORCPT ); Wed, 30 Dec 2015 08:14:08 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id C19AA8F517; Wed, 30 Dec 2015 13:14:07 +0000 (UTC) Received: from bcodding-csb.redhat.com (vpn-60-47.rdu2.redhat.com [10.10.60.47]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tBUDE6sd002518; Wed, 30 Dec 2015 08:14:06 -0500 Received: by bcodding-csb.redhat.com (Postfix, from userid 24008) id 2440FE3B5A; Wed, 30 Dec 2015 08:14:06 -0500 (EST) From: Benjamin Coddington To: Trond Myklebust , Anna Schumaker , Jeff Layton , "J. Bruce Fields" , Christoph Hellwig Cc: linux-nfs@vger.kernel.org Subject: [PATCH v4 01/10] NFS4: remove a redundant lock range check Date: Wed, 30 Dec 2015 08:13:57 -0500 Message-Id: <4b51943c8d3802ece5b99125a971759f77a57270.1451480826.git.bcodding@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP flock64_to_posix_lock() is already doing this check Signed-off-by: Benjamin Coddington Reviewed-by: Jeff Layton Reviewed-by: Christoph Hellwig --- fs/nfs/nfs4proc.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 8981803..2231d7d 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -6108,9 +6108,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);