2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/fs/exfat
Yuezhang Mo 46a557694b exfat: do not clear volume dirty flag during sync
xfstests generic/482 tests the file system consistency after each
FUA operation. It fails when run on exfat.

exFAT clears the volume dirty flag with a FUA operation during sync.
Since s_lock is not held when data is being written to a file, sync
can be executed at the same time. When data is being written to a
file, the FAT chain is updated first, and then the file size is
updated. If sync is executed between updating them, the length of the
FAT chain may be inconsistent with the file size.

To avoid the situation where the file system is inconsistent but the
volume dirty flag is cleared, this commit moves the clearing of the
volume dirty flag from exfat_fs_sync() to exfat_put_super(), so that
the volume dirty flag is not cleared until unmounting. After the
move, there is no additional action during sync, so exfat_fs_sync()
can be deleted.

Reviewed-by: Sungjong Seo <sj1557.seo@samsung.com>
Signed-off-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
2025-05-26 20:25:23 +09:00
..
balloc.c exfat: support batch discard of clusters when freeing clusters 2025-03-27 21:18:02 +09:00
cache.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
dir.c exfat: fix the infinite loop in exfat_readdir() 2024-12-31 17:49:40 +09:00
exfat_fs.h exfat: remove count used cluster from exfat_statfs() 2025-03-27 21:18:02 +09:00
exfat_raw.h exfat: add ioctls for accessing attributes 2023-10-31 10:00:51 +09:00
fatent.c exfat: fix the infinite loop in exfat_find_last_cluster() 2025-03-27 21:18:03 +09:00
file.c exfat: fix missing shutdown check 2025-03-27 21:18:03 +09:00
inode.c exfat: call bh_read in get_block only when necessary 2025-03-29 22:03:11 +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 vfs-6.15-rc1.async.dir 2025-03-24 10:47:14 -07:00
nls.c exfat: fix double free in delayed_free 2025-05-26 20:25:23 +09:00
super.c exfat: do not clear volume dirty flag during sync 2025-05-26 20:25:23 +09:00