diff options
author | Yuezhang Mo <Yuezhang.Mo@sony.com> | 2024-01-12 09:48:46 +0300 |
---|---|---|
committer | Namjae Jeon <linkinjeon@kernel.org> | 2024-04-25 15:59:59 +0300 |
commit | f19257997d9c31864b4cf3fcef6e2d2b9ede148d (patch) | |
tree | a902e776fc936e79395ca5ab318659feea91c3a7 /lib/.gitignore | |
parent | d7ed5232f0f16181506373d73e711190d5e0c868 (diff) | |
download | linux-f19257997d9c31864b4cf3fcef6e2d2b9ede148d.tar.xz |
exfat: zero the reserved fields of file and stream extension dentries
From exFAT specification, the reserved fields should initialize
to zero and should not use for any purpose.
If create a new dentry set in the UNUSED dentries, all fields
had been zeroed when allocating cluster to parent directory.
But if create a new dentry set in the DELETED dentries, the
reserved fields in file and stream extension dentries may be
non-zero. Because only the valid bit of the type field of the
dentry is cleared in exfat_remove_entries(), if the type of
dentry is different from the original(For example, a dentry that
was originally a file name dentry, then set to deleted dentry,
and then set as a file dentry), the reserved fields is non-zero.
So this commit initializes the dentry to 0 before createing file
dentry and stream extension dentry.
Signed-off-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: Andy Wu <Andy.Wu@sony.com>
Reviewed-by: Aoyama Wataru <wataru.aoyama@sony.com>
Reviewed-by: Sungjong Seo <sj1557.seo@samsung.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'lib/.gitignore')
0 files changed, 0 insertions, 0 deletions