diff options
| author | Christoph Hellwig <hch@lst.de> | 2026-01-08 15:19:06 +0100 |
|---|---|---|
| committer | Christian Brauner <brauner@kernel.org> | 2026-01-12 14:01:33 +0100 |
| commit | 188344c8ac0b740ee2e5deebda2004b39ccbee74 (patch) | |
| tree | ed8d57869674970495178366b127c598ec76aa84 /fs/sync.c | |
| parent | 761475268fa8e322fe6b80bcf557dc65517df71e (diff) | |
fs: factor out a sync_lazytime helper
Centralize how we synchronize a lazytime update into the actual on-disk
timestamp into a single helper.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://patch.msgid.link/20260108141934.2052404-7-hch@lst.de
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'fs/sync.c')
| -rw-r--r-- | fs/sync.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/sync.c b/fs/sync.c index 431fc5f5be06..4283af7119d1 100644 --- a/fs/sync.c +++ b/fs/sync.c @@ -183,8 +183,8 @@ int vfs_fsync_range(struct file *file, loff_t start, loff_t end, int datasync) if (!file->f_op->fsync) return -EINVAL; - if (!datasync && (inode_state_read_once(inode) & I_DIRTY_TIME)) - mark_inode_dirty_sync(inode); + if (!datasync) + sync_lazytime(inode); return file->f_op->fsync(file, start, end, datasync); } EXPORT_SYMBOL(vfs_fsync_range); |
