linux/fs/exfat
Yuezhang Mo f19257997d 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>
2024-04-25 21:59:59 +09:00
..
balloc.c exfat: using ffs instead of internal logic 2024-01-08 21:57:21 +09:00
cache.c mm, slab: remove last vestiges of SLAB_MEM_SPREAD 2024-03-12 20:32:19 -07:00
dir.c exfat: zero the reserved fields of file and stream extension dentries 2024-04-25 21:59:59 +09:00
exfat_fs.h exfat: remove unused functions 2024-03-19 20:56:01 +09:00
exfat_raw.h exfat: add ioctls for accessing attributes 2023-10-31 10:00:51 +09:00
fatent.c exfat: fix the newly allocated clusters are not freed in error handling 2023-02-28 20:01:40 +09:00
file.c exfat: fix timing of synchronizing bitmap and inode 2024-03-31 23:39:29 +09:00
inode.c exfat: remove unused functions 2024-03-19 20:56:01 +09:00
Kconfig fs: add CONFIG_BUFFER_HEAD 2023-08-02 09:13:09 -06:00
Makefile exfat: add Kconfig and Makefile 2020-03-05 21:00:40 -05:00
misc.c exfat: convert to new timestamp accessors 2023-10-18 13:26:21 +02:00
namei.c exfat: remove duplicate update parent dir 2024-03-19 20:56:10 +09:00
nls.c exfat: move freeing sbi, upcase table and dropping nls into rcu-delayed helper 2024-02-25 02:10:31 -05:00
super.c mm, slab: remove last vestiges of SLAB_MEM_SPREAD 2024-03-12 20:32:19 -07:00