From 188344c8ac0b740ee2e5deebda2004b39ccbee74 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Thu, 8 Jan 2026 15:19:06 +0100 Subject: 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 Link: https://patch.msgid.link/20260108141934.2052404-7-hch@lst.de Reviewed-by: Jan Kara Reviewed-by: Chaitanya Kulkarni Reviewed-by: Jeff Layton Signed-off-by: Christian Brauner --- fs/sync.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fs/sync.c') 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); -- cgit v1.2.3