From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 78DD6C433E0 for ; Tue, 7 Jul 2020 15:32:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4F738204EC for ; Tue, 7 Jul 2020 15:32:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1594135923; bh=K0CLogGZWlodpjrfwb0pe+ZZdvaZn1MTmQelP12Mxfc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=Pzb/Jbx5pFdSXBLboNZUK70w9+yjxyOOZfPsns5nAgolOnuTW1AktLDBJdRqipqlz VnzYbjjWgu49dF1mYQjZmVulT6D+hebWG2eZ5S9z/8OEj4lbLnMLvzXNPaEx6xXDrB HFI11vbJvekWaFMtkf1M7gq2m5wznSjnPxqAZl9c= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729885AbgGGPWi (ORCPT ); Tue, 7 Jul 2020 11:22:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:35256 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729884AbgGGPWi (ORCPT ); Tue, 7 Jul 2020 11:22:38 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 352BE206E2; Tue, 7 Jul 2020 15:22:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1594135357; bh=K0CLogGZWlodpjrfwb0pe+ZZdvaZn1MTmQelP12Mxfc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rymcV+IViFngStWOJ//HpIFVM+8FJuL4d68lziuJu2Cb+z7DdIRelW9BMRGyCA0+9 RLiZLAUn4RRWJGzdBYfGzZ2LMustFuW1Paluykzc1yolbB1IRd+uUKmJezbQq2EZBQ 8thBuSsIqCAMPERXYQ/4S1ahY4F/zBEB3k1PGhD4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Hyeongseok.Kim" , Sungjong Seo , Namjae Jeon , Sasha Levin Subject: [PATCH 5.7 001/112] exfat: Set the unused characters of FileName field to the value 0000h Date: Tue, 7 Jul 2020 17:16:06 +0200 Message-Id: <20200707145801.001010596@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200707145800.925304888@linuxfoundation.org> References: <20200707145800.925304888@linuxfoundation.org> User-Agent: quilt/0.66 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Hyeongseok.Kim [ Upstream commit 4ba6ccd695f5ed3ae851e59b443b757bbe4557fe ] 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. Signed-off-by: Hyeongseok.Kim Reviewed-by: Sungjong Seo Signed-off-by: Namjae Jeon Signed-off-by: Sasha Levin --- 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 4b91afb0f0515..349ca0c282c2c 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.25.1