From patchwork Fri Aug 12 07:57:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salah Triki X-Patchwork-Id: 9276535 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1AC2560752 for ; Fri, 12 Aug 2016 07:57:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0CF7D288FA for ; Fri, 12 Aug 2016 07:57:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 005D8288FF; Fri, 12 Aug 2016 07:57:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9D319288FA for ; Fri, 12 Aug 2016 07:57:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751154AbcHLH5M (ORCPT ); Fri, 12 Aug 2016 03:57:12 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:35821 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750708AbcHLH5L (ORCPT ); Fri, 12 Aug 2016 03:57:11 -0400 Received: by mail-wm0-f67.google.com with SMTP id i5so1415712wmg.2; Fri, 12 Aug 2016 00:57:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=GbGqX/bvUDEB1hBTJ6SHZd9R6bmVimx/NHpLE0hdCBI=; b=dv5jaP99EaDP/eVsbg3bpo+CyQ82DMUGE1dGq1HP2XyGj44oX5KGLWm94hYWliLgoJ E/+Asp8kIeMiw5sMvBwBNwT0NHayD92EHSDHv517K4cI72pYjA42saP8O3TWyheDyQmN SMU0FzUk1SjcsFeHbbwUzgyZkP6JwGySJXUUStoCzwpfjHolxSMlNmRZ5Yl3TquRzxSz 2UjqWie1rtqmgGimVCLMO4RfhE2HukwM4QWrf6C5eDEwWeHQoq/Al6SNtHJX/7qelvy0 WjQGU9EATeDAHs+Tt9FQlB2cMnHIg25gxTE60BkzmB28jRMBK2At/rorWwmWpAvUB6Z+ tijA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=GbGqX/bvUDEB1hBTJ6SHZd9R6bmVimx/NHpLE0hdCBI=; b=jw4A1L3i4Td11vkFmmGvUFR1Ei675v3X8UgjuX+NZIhrwgaP+45gbPVZyQAI1WA3we /1hjE5uCRfPAQ36feTdhuB1hvoEn0jRqSH0g9080AfNFEESItenft9plw54VzlL0bFS2 VQAUycNhFbDx9d8Dk7Lm1YWmGbSq0OSsgephyBSMnExA4cdQh5kBGn3hM3Ve4YUgbgvO bKH3o7qljbr37Mry3xXUgTu1oQPH5KcusVOVV2whPmB9jZ75N8HQMKJdAbeR99RSbbQn zrPpAxyITQBo+T2DHmS/bNL/r6/F0NWmgADWoLyIgFsklMrdPdRVQ3G9F+JPBG82xDuQ WmSg== X-Gm-Message-State: AEkoousd7bx8aU01efU4UJ+hgJCYCvfF4lHByKY0WjCBuRZi1OFSse5FjfXKGMKSGEQ/FA== X-Received: by 10.28.50.199 with SMTP id y190mr1444189wmy.61.1470988629713; Fri, 12 Aug 2016 00:57:09 -0700 (PDT) Received: from localhost.localdomain ([165.50.75.145]) by smtp.gmail.com with ESMTPSA id h7sm6313358wjd.17.2016.08.12.00.57.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 12 Aug 2016 00:57:08 -0700 (PDT) From: Salah Triki To: viro@zeniv.linux.org.uk Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, salah.triki@gmail.com Subject: [PATCH] fs: remove unnecessary setting of error Date: Fri, 12 Aug 2016 08:57:02 +0100 Message-Id: <1470988622-7178-1-git-send-email-salah.triki@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP setting error to -EINVAL is unnecessary. It is already set, above. Signed-off-by: Salah Triki --- fs/open.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/open.c b/fs/open.c index 4fd6e25..b438edc 100644 --- a/fs/open.c +++ b/fs/open.c @@ -176,7 +176,6 @@ static long do_sys_ftruncate(unsigned int fd, loff_t length, int small) if (!S_ISREG(inode->i_mode) || !(f.file->f_mode & FMODE_WRITE)) goto out_putf; - error = -EINVAL; /* Cannot ftruncate over 2^31 bytes without large file support */ if (small && length > MAX_NON_LFS) goto out_putf;