diff options
author | Sungjong Seo <sj1557.seo@samsung.com> | 2020-06-18 13:43:26 +0200 |
---|---|---|
committer | Namjae Jeon <namjae.jeon@samsung.com> | 2020-06-29 10:11:18 +0200 |
commit | 5267456e953fd8c5abd8e278b1cc6a9f9027ac0a (patch) | |
tree | 65250c98c0c38be91b66c7a22bc7c3cd1e136fc3 /fs/exfat/dir.c | |
parent | exfat: move setting VOL_DIRTY over exfat_remove_entries() (diff) | |
download | linux-5267456e953fd8c5abd8e278b1cc6a9f9027ac0a.tar.xz linux-5267456e953fd8c5abd8e278b1cc6a9f9027ac0a.zip |
exfat: flush dirty metadata in fsync
generic_file_fsync() exfat used could not guarantee the consistency of
a file because it has flushed not dirty metadata but only dirty data pages
for a file.
Instead of that, use exfat_file_fsync() for files and directories so that
it guarantees to commit both the metadata and data pages for a file.
Signed-off-by: Sungjong Seo <sj1557.seo@samsung.com>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Diffstat (limited to 'fs/exfat/dir.c')
-rw-r--r-- | fs/exfat/dir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/exfat/dir.c b/fs/exfat/dir.c index 8e775bd5d523..91ece649285d 100644 --- a/fs/exfat/dir.c +++ b/fs/exfat/dir.c @@ -309,7 +309,7 @@ const struct file_operations exfat_dir_operations = { .llseek = generic_file_llseek, .read = generic_read_dir, .iterate = exfat_iterate, - .fsync = generic_file_fsync, + .fsync = exfat_file_fsync, }; int exfat_alloc_new_dir(struct inode *inode, struct exfat_chain *clu) |