diff options
| author | DaeMyung Kang <charsyam@gmail.com> | 2026-10-13 23:58:46 +0900 |
|---|---|---|
| committer | Namjae Jeon <linkinjeon@kernel.org> | 2026-10-20 17:28:05 +0900 |
| commit | 950f860839f31b7617190cf0bdd277abf3e43125 (patch) | |
| tree | 024c54d81fe6895f1c4f6cb5d4e7f754dbe7a334 /scripts/Makefile.thinlto | |
| parent | 8a69be3669e2ef632e0333eac0ae80fd91c3c1f3 (diff) | |
| download | linux-next-950f860839f31b7617190cf0bdd277abf3e43125.tar.gz linux-next-950f860839f31b7617190cf0bdd277abf3e43125.zip | |
ntfs: flush the block device when syncing a directory
ntfs_dir_fsync() writes directory metadata and calls sync_blockdev(),
but does not flush the block device write cache. A successful fsync()
can therefore leave the directory's metadata in a volatile device cache.
Issue a cache flush after successful writeback and return any flush error.
This matches the regular-file fsync and syncfs paths.
With QEMU blkdebug injecting -EIO for flush_to_disk, fsync() on an NTFS
directory returned 0 before this change while syncfs() returned -EIO.
After this change, both return -EIO. A kretprobe confirmed the flush
error in the directory fsync path.
Fixes: 1e9ea7e04472 ("Revert "fs: Remove NTFS classic"")
Cc: stable@vger.kernel.org
Signed-off-by: DaeMyung Kang <charsyam@gmail.com>
Reviewed-by: Baolin Liu <liubaolin@kylinos.cn>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
