Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp347694ybl; Thu, 5 Dec 2019 21:45:18 -0800 (PST) X-Google-Smtp-Source: APXvYqwYglbm+a2K3h8AVmOYFPHniDO0PW9bfjpNv3R++iupoh1UJbQenJtjXXiSqmSGFfCueC2Z X-Received: by 2002:a9d:74c4:: with SMTP id a4mr10016147otl.119.1575611117994; Thu, 05 Dec 2019 21:45:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1575611117; cv=pass; d=google.com; s=arc-20160816; b=ssaNYPmMBF+Kt6Wb9l9l4yLUBK3i0UhXNqNI+vSC576pvGpCpS4KcJNg3kgBeELH9j QrE2byZT2Wm3jYtLjzGaz299l2LkRKVvxw1P3xmeIXHYyCtJJ7sptP8KZPL0BXgxjABk dORpzxkW7V+Jq5FrQY/brP9r19mndfF4LV63jno1a0HX5Jn8P3tcBUxw9wy8RImzSmIU j9CjQBGeczXs8tZTLmQfbUbtPPKZpQjpip28rjA88dEGkNKSWVCIKdQitcYpRI5Y72Kj UaBbwRdh1bXtmjrODKBLaB7Pl6jgGzEbKmW0EDhw01bMv6bpDNh7sl47ZUpQcVLpwmAP nWQQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :date:subject:message-id:cc:to:from:dkim-signature; bh=qMjz0gwsl/SZhuHolPZtRDe479E79pKBqoTZbhGlrUY=; b=ammu8s9kY50vPXJ6nUasSsrkxyTQq/aBEQuXF4ocnGJFrSyMDGnR2asHenuihkeFMb vjmuXYZZ0peqPvl/IMpvhimvE/R16el3B3612nE00aDXo/wx64ESlXFL4KzxVEya9nhV RF2XBhPG3+P4YArIfAUNn+s/x0x6EZMuz8p5PJ2D7FrD1ZQPGGy79kShtK6EitAPrQ5f infjmEJQJ32ZYLbNHr1BrRepKzW6ITLDPFRtXwzo03nZv/hKxK81oZKgThCtYfGV5WQo 1YCIYLDBVmP3zNBdrnH5QpGe+Ji6XBaSHEi7zbAJ7tM7Zs1RtlN8h+L1YkpoSEO5CV0d 1zrQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@mykernel.net header.s=zohomail header.b=TyMrBEFF; arc=pass (i=1 spf=pass spfdomain=mykernel.net dkim=pass dkdomain=mykernel.net dmarc=pass fromdomain=mykernel.net>); spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-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 r26si5813404otc.163.2019.12.05.21.45.00; Thu, 05 Dec 2019 21:45:17 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@mykernel.net header.s=zohomail header.b=TyMrBEFF; arc=pass (i=1 spf=pass spfdomain=mykernel.net dkim=pass dkdomain=mykernel.net dmarc=pass fromdomain=mykernel.net>); spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726069AbfLFFni (ORCPT + 99 others); Fri, 6 Dec 2019 00:43:38 -0500 Received: from sender3-of-o52.zoho.com.cn ([124.251.121.247]:21930 "EHLO sender3-of-o52.zoho.com.cn" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726068AbfLFFni (ORCPT ); Fri, 6 Dec 2019 00:43:38 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1575611010; cv=none; d=zoho.com.cn; s=zohoarc; b=EnAaEkuGTTP/L3WjdbMbHjR3fMDpsUThsYS44c0Bn9slt2rpuRoiu2aRnx4iKmJqJT42E+OFDj/zCNlH3cTWTPgzbVgii/E1jW2vowwQnnzUn/oeJNqQGP1dCm5FJO5dIoe+Uk01RXDMD1GH9b+FD/uFNz91sraKWtBpZxze8Wo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com.cn; s=zohoarc; t=1575611010; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:MIME-Version:Message-ID:Subject:To; bh=qMjz0gwsl/SZhuHolPZtRDe479E79pKBqoTZbhGlrUY=; b=INGOxfLwU0occwPK/pP0QHUYbjJwRiXMr6E2PXmx4rwLj6Wynuj8daiDeuoyFnjFczrY0IlNThue830lz1aZDbU/feFMkECnr7+wMsrtskWqFlx8VsaxQd45MmiPr+cqPLGw4MMXfSS+mLPjPbeic2aN5x8c/FbldzjHtDanw44= ARC-Authentication-Results: i=1; mx.zoho.com.cn; dkim=pass header.i=mykernel.net; spf=pass smtp.mailfrom=cgxu519@mykernel.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1575611010; s=zohomail; d=mykernel.net; i=cgxu519@mykernel.net; h=From:To:Cc:Message-ID:Subject:Date:MIME-Version:Content-Transfer-Encoding:Content-Type; l=662; bh=qMjz0gwsl/SZhuHolPZtRDe479E79pKBqoTZbhGlrUY=; b=TyMrBEFFZgBP0sAD67zO4aGBea5vpG7I8yUBCC92xMb8b5H2WrsC0DDdkmP8VCKr DkXaHSk7o5Xy8KGfjuq72joTpa287dfgB48jF6p2cSUCJMK7CI4q2DB3n0g7pOtVqqc FI69v/jPrzCroS7RcEoxQ5DygGKGESqs5C2U+hQ0= Received: from localhost.localdomain (218.18.229.179 [218.18.229.179]) by mx.zoho.com.cn with SMTPS id 1575611008148625.6889963843007; Fri, 6 Dec 2019 13:43:28 +0800 (CST) From: Chengguang Xu To: tytso@mit.edu, adilger.kernel@dilger.ca Cc: linux-ext4@vger.kernel.org, Chengguang Xu Message-ID: <20191206054317.3107-1-cgxu519@mykernel.net> Subject: [PATCH] ext4: remove unnecessary assignment in ext4_htree_store_dirent() Date: Fri, 6 Dec 2019 13:43:17 +0800 X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoCNMailClient: External Content-Type: text/plain; charset=utf8 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org We have allocated memory using kzalloc() so don't have to set 0 again in last byte. Signed-off-by: Chengguang Xu --- fs/ext4/dir.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/ext4/dir.c b/fs/ext4/dir.c index 9fdd2b269d61..5923c9147ae7 100644 --- a/fs/ext4/dir.c +++ b/fs/ext4/dir.c @@ -458,7 +458,6 @@ int ext4_htree_store_dirent(struct file *dir_file, __u3= 2 hash, =09new_fn->name_len =3D ent_name->len; =09new_fn->file_type =3D dirent->file_type; =09memcpy(new_fn->name, ent_name->name, ent_name->len); -=09new_fn->name[ent_name->len] =3D 0; =20 =09while (*p) { =09=09parent =3D *p; --=20 2.20.1