Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1021927ybt; Wed, 1 Jul 2020 16:27:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBpr/DtwShTso17bLXwTPwQivFkR7RVc+6Gsz1NFcGFFaKVM8I3RlqWnlDnBkQ8H72NYax X-Received: by 2002:a17:906:148a:: with SMTP id x10mr26555576ejc.497.1593646047875; Wed, 01 Jul 2020 16:27:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593646047; cv=none; d=google.com; s=arc-20160816; b=jQ8kmPs5L6VsdB4AQtbuccObTkrNm0UDwSg5AYafhHLF6dI3mNXYwaH9xlDBdTH/VE zTh3xVM9vXRZ/7GwuLZzUsSChTepk7uUFmhGncM+vhC+IxkkiQa5JI78/QqP8VsDeTwe 0hLXNuWbL2U/Vkf5MaoFwr0uA2HdUyQ8O/FuwZqkyxmDczjOjRY17Gl3FImkKcef1bR2 +ESw4bwh0gWOTRrV21ag89LgQ21qk9ivdMLpRJeClNk7W6iJmwbMSbyvfNU1EdFYRvAd vghLbavxldt3Zh85K+OWchk22xK1N6n1SR3/hdWF77mJffJMB9V3NgQC8cUgDuanRcmO DHNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:dlp-filter:cms-type :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :dkim-filter; bh=AwryGmeBPsvF8p1weflyNQEdqWqgGlewjxNS+5te05w=; b=gHQP8IJ4kpdvYqO3g7HwbqDS+wkubCDCVHmKcfhUiPh2Rfgas5OsQ31T7iuUFg6Kwx VJP3M9Li74osdXVfmWkmec4DnzqQBWdBnw56xLO7i0XkE7PvtqJWCrjey0j+a4ByG4W+ nPghc4zWERnDnsLS/VdKAueWTibxIa9qiwxYZ5lcYsWyEwR4vrDTfEXJrPb5u07V8rtT K8Z8sCmRJ3PsPnOz7+iZ9hElYAn2wv9XxmRK8cBGlqbJ9cFudTMIO0uYbKINq8nVfsrZ 55nhnvvxH5K4lUYrulp0Bd7ooPGnFc+He0vRaptbDhpoaVIZz4lJLiCAOtFtfO+gjjT2 s1VQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=ZBu7CFOI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b9si4533695edq.23.2020.07.01.16.27.04; Wed, 01 Jul 2020 16:27:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=ZBu7CFOI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727899AbgGAX0A (ORCPT + 99 others); Wed, 1 Jul 2020 19:26:00 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:31469 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726464AbgGAXZm (ORCPT ); Wed, 1 Jul 2020 19:25:42 -0400 Received: from epcas1p4.samsung.com (unknown [182.195.41.48]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20200701232538epoutp02236c9463cba1b8d5a642003dd4c976e0~dxIm3nFoA0803408034epoutp02X for ; Wed, 1 Jul 2020 23:25:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20200701232538epoutp02236c9463cba1b8d5a642003dd4c976e0~dxIm3nFoA0803408034epoutp02X DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1593645938; bh=AwryGmeBPsvF8p1weflyNQEdqWqgGlewjxNS+5te05w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZBu7CFOIyhIbBA338wo2tJTnj2FEkqJyNC83Eo5uOmWVoUrLRO7VinEp/06S0j7iR OTY+HWvNI2BtSKAbKRRaw7glqnh/XXZgxAQQ1kWYxuiWQ7DOmZgmt/ooFJFCPxpiHd jqhacl+BIlf7bJPOK8Hh4rqn9Oc+eoz/cThM8n6o= Received: from epsnrtp2.localdomain (unknown [182.195.42.163]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20200701232538epcas1p390437cc959439a9d3b7aafae4d3ab143~dxImRO5_D0140501405epcas1p3D; Wed, 1 Jul 2020 23:25:38 +0000 (GMT) Received: from epsmges1p1.samsung.com (unknown [182.195.40.159]) by epsnrtp2.localdomain (Postfix) with ESMTP id 49xy5F1lzXzMqYkW; Wed, 1 Jul 2020 23:25:37 +0000 (GMT) Received: from epcas1p1.samsung.com ( [182.195.41.45]) by epsmges1p1.samsung.com (Symantec Messaging Gateway) with SMTP id 97.5B.18978.17B1DFE5; Thu, 2 Jul 2020 08:25:37 +0900 (KST) Received: from epsmtrp2.samsung.com (unknown [182.195.40.14]) by epcas1p1.samsung.com (KnoxPortal) with ESMTPA id 20200701232536epcas1p1e0f92c7cc47e06ce490088c2e3cc1a21~dxIktvS4f1844818448epcas1p1N; Wed, 1 Jul 2020 23:25:36 +0000 (GMT) Received: from epsmgms1p1new.samsung.com (unknown [182.195.42.41]) by epsmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200701232536epsmtrp28bf9711707d4b279be92689ee8d0982f~dxIksjSla1851918519epsmtrp25; Wed, 1 Jul 2020 23:25:36 +0000 (GMT) X-AuditID: b6c32a35-603ff70000004a22-fb-5efd1b71a238 Received: from epsmtip2.samsung.com ( [182.195.34.31]) by epsmgms1p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 48.0C.08382.07B1DFE5; Thu, 2 Jul 2020 08:25:36 +0900 (KST) Received: from localhost.localdomain (unknown [10.88.103.87]) by epsmtip2.samsung.com (KnoxPortal) with ESMTPA id 20200701232536epsmtip23b0e8afbcb7385b02fc04f60b14d6811~dxIkg68Ib2699026990epsmtip2g; Wed, 1 Jul 2020 23:25:36 +0000 (GMT) From: Namjae Jeon To: gregkh@linuxfoundation.org, sashal@kernel.org Cc: stable@vger.kernel.org, linux-kernel@vger.kernel.org, "Hyeongseok.Kim" , Namjae Jeon Subject: [PATCH 5.7.y 1/5] exfat: Set the unused characters of FileName field to the value 0000h Date: Thu, 2 Jul 2020 08:20:20 +0900 Message-Id: <20200701232024.2083-2-namjae.jeon@samsung.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200701232024.2083-1-namjae.jeon@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrGKsWRmVeSWpSXmKPExsWy7bCmrm6h9N84g95HPBbNi9ezWfyd+InJ 4vKuOWwWP6bXW2xac43NYsHGR4wObB47Z91l99i0qpPNY//cNewefVtWMXp83iQXwBqVY5OR mpiSWqSQmpecn5KZl26r5B0c7xxvamZgqGtoaWGupJCXmJtqq+TiE6DrlpkDdICSQlliTilQ KCCxuFhJ386mKL+0JFUhI7+4xFYptSAlp8DQoECvODG3uDQvXS85P9fK0MDAyBSoMiEn4+G8 dSwFvZwVd55cYW1gPMDexcjJISFgItHYcoaxi5GLQ0hgB6PExOOLoZxPjBL/r15gh3C+MUo8 2/2bCaZl5sJ9zBCJvYwSi1+cYoFrmd7yA6ifg4NNQFvizxZRkAYRAUOJG5+vgdUwC3QxSuy6 3c0KkhAWSJK49Gc1G4jNIqAqcbGlgxHE5hWwljjVepYZYpu8xOoNB8BsTgEbiXXn/oPdJyGw j13iWsM0dpBlEgIuEvMmpUHUC0u8Or4F6jkpic/v9rJBlFRLfNwPNbKDUeLFd1sI21ji5voN rCAlzAKaEut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tMGvOCHelMTKqtSi/Pii0pzU4kOM0hwsSuK8NwoXxgkJpCeWpGanphakFsFk mTg4pRqYahITczcuk9RYckgmOXPzVRYmc5OuQ14Ju/U+bGjrkrJOi0h7PVH3wsakjjeb01q7 ulTOyk2fahDTys0jnNnmpZve+iHx0zM3gyJVsXdljK2TxNTmrt50aMsZdu5/B5J507dOFs5n TlpxVefLH4t+yZ+u5z51KAtNTp787YjiVN1pXQqrElp18tcYPpBaz3BhaWeL4w8VBxV7eeul LKqZElWdR4t4it1f9+lK+CieqE/ZrHbr3HeZg7+z/l/dEMUjtPdW/kNPzTy+dX8ufI530P68 wvuZlfWcyYqzGkQ5I/US9Sf7Z2/Sb8hwXX7UVLjUaaNXz8WF+7gOLVbeu3Oemfpbm9Yd94MU pv/036XEUpyRaKjFXFScCADXuoeIoQIAAA== X-CMS-MailID: 20200701232536epcas1p1e0f92c7cc47e06ce490088c2e3cc1a21 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: SVC_REQ_APPROVE CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20200701232536epcas1p1e0f92c7cc47e06ce490088c2e3cc1a21 References: <20200701232024.2083-1-namjae.jeon@samsung.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Hyeongseok.Kim" Some fsck tool complain that padding part of the FileName field is not set to the value 0000h. So let's maintain filesystem cleaner, as exfat's spec. recommendation. Fixes: ca06197382bd ("exfat: add directory operations") Cc: stable@vger.kernel.org # v5.7 Signed-off-by: Hyeongseok.Kim Reviewed-by: Sungjong Seo Signed-off-by: Namjae Jeon --- fs/exfat/dir.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/fs/exfat/dir.c b/fs/exfat/dir.c index 4b91afb0f051..349ca0c282c2 100644 --- a/fs/exfat/dir.c +++ b/fs/exfat/dir.c @@ -430,10 +430,12 @@ static void exfat_init_name_entry(struct exfat_dentry *ep, ep->dentry.name.flags = 0x0; for (i = 0; i < EXFAT_FILE_NAME_LEN; i++) { - ep->dentry.name.unicode_0_14[i] = cpu_to_le16(*uniname); - if (*uniname == 0x0) - break; - uniname++; + if (*uniname != 0x0) { + ep->dentry.name.unicode_0_14[i] = cpu_to_le16(*uniname); + uniname++; + } else { + ep->dentry.name.unicode_0_14[i] = 0x0; + } } } -- 2.17.1