Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2112939pxj; Wed, 19 May 2021 23:56:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYq/AODMr7UXxRfmJnitDUdO2LtDojgjnjyVYzAiZ+mMvskFng5zj0lEd+tVUQdham69xN X-Received: by 2002:a17:906:6b92:: with SMTP id l18mr3190296ejr.367.1621493815970; Wed, 19 May 2021 23:56:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621493815; cv=none; d=google.com; s=arc-20160816; b=eql3ggGn0yrQdp1QI4+65eEmwdAMV5PYa6y2NI4b0FQzRwes+LFyV9/OSDXumtZ4Yo DZlWJYOoz+XUjjEVdntPYZLcMnPS6586uQeV+vfLDpTB8wmbZEBTZ6S0mDLQVinzSKZ/ Cnbazh55hDKswRVQzLldiMyaYFz0lcWf4RFo5hig943fIuL0kLUaFqE9cZctscQU1E4W cNcWCVNMLwefRluws6UMR5bh2/orZZ+CZqEeoDksSxs11XU+u+sc7Wwu/NQsDRx9+V/8 lhF4pHD9QBW+tq4I87FR1rQfbGmVPtewVF9Qw4eKd4xUcBQdkjAWRnU1tvtxUwR9AOWl Wc9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=yBlYIF8Kg7yr0OhpW44nyW4M4wDKm2iUO78jkOiNNag=; b=VkZCi4jydnu8I9L1ZINAf+w1AH3Ps/ktrICn2gnn/4ZYJmfyABPkuvWYnSt+jjVFTD us6ibCQCF8XGH/5qCMJ7DQHynJwos/UOxLOOwGays0dWF+y+LvdIizywhDF6oj6U+l1u 8clnKsmhYEA907RTLAErOdchubhmmk4Rnbxk24HtkrjBfCADqZn/U6XZsiXeAFSGuuZ4 bC1AVjpBp59v5BWMUcI4E0z2hwKINDhnTOU0iYdnJO7WWC5wzgDPMdvwEi0x8menejnf ukWkSsnz+x8P/e6gvhOPA8R96Uej91dVEC86oRMPaSRaEiX3k9XwZiGd76yFNmg436G7 e3ig== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=hisilicon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r19si2078356ejy.43.2021.05.19.23.56.29; Wed, 19 May 2021 23:56:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=hisilicon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229978AbhETG5S (ORCPT + 99 others); Thu, 20 May 2021 02:57:18 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:4694 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229547AbhETG5S (ORCPT ); Thu, 20 May 2021 02:57:18 -0400 Received: from dggems701-chm.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4Fm0n10Fyjz16PTV; Thu, 20 May 2021 14:53:09 +0800 (CST) Received: from dggeme759-chm.china.huawei.com (10.3.19.105) by dggems701-chm.china.huawei.com (10.3.19.178) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Thu, 20 May 2021 14:55:55 +0800 Received: from localhost.localdomain (10.69.192.56) by dggeme759-chm.china.huawei.com (10.3.19.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Thu, 20 May 2021 14:55:55 +0800 From: Tian Tao To: , CC: , Tian Tao Subject: [PATCH v2] ext4: remove set but rewrite variables Date: Thu, 20 May 2021 14:55:52 +0800 Message-ID: <1621493752-36890-1-git-send-email-tiantao6@hisilicon.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.69.192.56] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggeme759-chm.china.huawei.com (10.3.19.105) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org In the ext4_dx_add_entry function, the at variable is assigned but will reset just after “again:” label. So delete the unnecessary assignment. this will not chang the logic. Signed-off-by: Tian Tao Reviewed-by: Artem Blagodarenko --- v2: update the commit message. --- fs/ext4/namei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index afb9d05..18bbf15 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c @@ -2497,7 +2497,7 @@ static int ext4_dx_add_entry(handle_t *handle, struct ext4_filename *fname, /* Which index block gets the new entry? */ if (at - entries >= icount1) { - frame->at = at = at - entries - icount1 + entries2; + frame->at = at - entries - icount1 + entries2; frame->entries = entries = entries2; swap(frame->bh, bh2); } -- 2.7.4