Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp520646imu; Fri, 25 Jan 2019 06:26:41 -0800 (PST) X-Google-Smtp-Source: ALg8bN6XCE4pQpx/4MpTTpNFQ+vedXP3m2t9bRCZ95suEIZJ8Qlgo2+evPzQo1aiPp09zkr0xsf6 X-Received: by 2002:a17:902:887:: with SMTP id 7mr11153028pll.164.1548426401543; Fri, 25 Jan 2019 06:26:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548426401; cv=none; d=google.com; s=arc-20160816; b=olX1e/uUDfElxY5rfGUpWCkKAgNlA4RMHzo96gc37HY7aunqejkOoSPupATcRn09tC 9fKGK0xiuPVtl9FxSA6ViZwSVjdfcPOv3+ZOClcRf/PycwaBS61grdo68HA9yuK2RRLi iZGpqkAAE4+wkUhvQqQrYUQvv0LbWEnyTf/vEGpD2Nr1BteKhua7HYAsX3W86HUzOsr/ mmFWkKpzPGb3+EQ72LLtnPat2v/yrG7FI9a1miP4KWujGK2cUetqoIQy2Ye9w5EbhFSL hMEA93azbrZvNUcVzsEF+rcaULZ2DVkiKNeCO1yImEa1PuYzAxk0O+aOwWhRtGu5C5IB AqPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=OUL+Y8PR/Im50/jrlTxDP0rD7ONRrOch0jQYzUMgudg=; b=ouL3gTsDT5mB/HYGNoKBJ/RGZXTbTvSFvvAaUhsu7yxwinGrnyZF6O6F3TING0RNyS FTpZ3luROpRfH2NRfiFft/GzO41uyx0p2vA+QP/wrBGhjBH3LrgaCf6SiOszrfl+L+fv /b0Bmu4/5hPUS8g3JYUddmwgJ4jEuQRZxhVdYTIl7i3kTB0Se2gSh0wouE0Mia+FwQFy l5PBDZYxJb4mg+aUAbv+TT05tA0Rd//glbLhUZ1TVMiz0nEHx1epvjX1Co9fz/mBX5xl iOdP/07QL8xrd9NV/mWz4CSv/ZvwBNIjkSWPm91qyR/3jtKEDcdzfcW75iQryXbRJCIt oU9w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i15si2800802pfj.162.2019.01.25.06.26.25; Fri, 25 Jan 2019 06:26:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726647AbfAYOZC (ORCPT + 99 others); Fri, 25 Jan 2019 09:25:02 -0500 Received: from smtprz14.163.net ([106.3.154.247]:54046 "EHLO smtp.tom.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726321AbfAYOZB (ORCPT ); Fri, 25 Jan 2019 09:25:01 -0500 Received: from 172.25.16.148 (unknown [172.25.16.148]) by freemail01.tom.com (Postfix) with ESMTP id C49271C819EF for ; Fri, 25 Jan 2019 22:01:11 +0800 (CST) Received: from 172.25.16.90 (HELO smtp.tom.com) ([172.25.16.90]) by localhost (TOM SMTP Server) with SMTP ID 606470645 for ; Fri, 25 Jan 2019 22:01:11 +0800 (CST) Received: from antispam1.tom.com (unknown [172.25.16.55]) by freemail01.tom.com (Postfix) with ESMTP id A63F61C819B3 for ; Fri, 25 Jan 2019 22:01:11 +0800 (CST) Received: from antispam1.tom.com (antispam1.tom.com [127.0.0.1]) by antispam1.tom.com (Postfix) with ESMTP id A148F10016C4 for ; Fri, 25 Jan 2019 22:01:11 +0800 (CST) X-Virus-Scanned: Debian amavisd-new at antispam1.tom.com Received: from antispam1.tom.com ([127.0.0.1]) by antispam1.tom.com (antispam1.tom.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SxUx8Pbg4UXm for ; Fri, 25 Jan 2019 22:01:10 +0800 (CST) Received: from localhost (unknown [222.209.19.163]) by antispam1.tom.com (Postfix) with ESMTPA id 58B691001670; Fri, 25 Jan 2019 22:01:10 +0800 (CST) From: Liu Xiang To: jack@suse.com Cc: linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, liuxiang_1999@126.com, Liu Xiang Subject: [PATCH] ext2: Remove useless reset code Date: Fri, 25 Jan 2019 22:01:04 +0800 Message-Id: <1548424864-4647-1-git-send-email-liu.xiang6@zte.com.cn> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If ((char *)de == dir_end) is true, the name_len will not be used in the subsequent routine. So the reset code can be removed. Signed-off-by: Liu Xiang --- fs/ext2/dir.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/ext2/dir.c b/fs/ext2/dir.c index 3b8114d..5ec497f 100644 --- a/fs/ext2/dir.c +++ b/fs/ext2/dir.c @@ -517,7 +517,6 @@ int ext2_add_link (struct dentry *dentry, struct inode *inode) while ((char *)de <= kaddr) { if ((char *)de == dir_end) { /* We hit i_size */ - name_len = 0; rec_len = chunk_size; de->rec_len = ext2_rec_len_to_disk(chunk_size); de->inode = 0; -- 1.9.1