RE: [PATCH v2] exfat: Set the unused characters of FileName field to the value 0000h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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.
> 
> Signe-off-by: Hyeongseok.Kim <Hyeongseok@xxxxxxxxx>

Reviewed-by: Sungjong Seo <sj1557.seo@xxxxxxxxxxx>

Looks good to me. Thanks.

> ---
>  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 de43534..8e775bd 100644
> --- a/fs/exfat/dir.c
> +++ b/fs/exfat/dir.c
> @@ -425,10 +425,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.7.4





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux