diff options
| author | Mark Brown <broonie@kernel.org> | 2026-03-30 19:59:52 +0300 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-03-30 19:59:52 +0300 |
| commit | 2a740dc5892a0e90e32ddae4d0ece501ace2adfc (patch) | |
| tree | a1a309c150404c63605140544f60eee9287adf26 /fs/ext4/fsync.c | |
| parent | 1e28cdeec31333b165f72b6ad647652c4c6f6ff2 (diff) | |
| parent | 8ec017cf31299c4b6287ebe27afe81c986aeef88 (diff) | |
| download | linux-2a740dc5892a0e90e32ddae4d0ece501ace2adfc.tar.xz | |
ASoC: Merge up fixes
Merge branch 'for-7.0' of
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into
asoc-7.1 for both ASoC and general bug fixes to support testing.
Diffstat (limited to 'fs/ext4/fsync.c')
| -rw-r--r-- | fs/ext4/fsync.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/fs/ext4/fsync.c b/fs/ext4/fsync.c index e476c6de3074..bd8f230fa507 100644 --- a/fs/ext4/fsync.c +++ b/fs/ext4/fsync.c @@ -83,11 +83,23 @@ static int ext4_fsync_nojournal(struct file *file, loff_t start, loff_t end, int datasync, bool *needs_barrier) { struct inode *inode = file->f_inode; + struct writeback_control wbc = { + .sync_mode = WB_SYNC_ALL, + .nr_to_write = 0, + }; int ret; ret = generic_buffers_fsync_noflush(file, start, end, datasync); - if (!ret) - ret = ext4_sync_parent(inode); + if (ret) + return ret; + + /* Force writeout of inode table buffer to disk */ + ret = ext4_write_inode(inode, &wbc); + if (ret) + return ret; + + ret = ext4_sync_parent(inode); + if (test_opt(inode->i_sb, BARRIER)) *needs_barrier = true; |
