Re: [PATCH 10/14] fs: factor out a sync_lazytime helper

Christoph Hellwig <[email protected]>
Newsgroups dev.linux.lists.gfs2,org.infradead.lists.linux-mtd,org.kernel.vger.io-uring,org.kernel.vger.linux-btrfs,org.kernel.vger.linux-kernel,org.kernel.vger.linux-nfs,org.kernel.vger.linux-unionfs,org.kernel.vger.linux-xfs
Message-ID <[email protected]>
On Mon, Nov 24, 2025 at 02:31:02PM +0100, Jan Kara wrote:
> > +	if (wbc->sync_mode == WB_SYNC_ALL ||
> > +	    time_after(jiffies, inode->dirtied_time_when +
> > +			dirtytime_expire_interval * HZ))
> > +		sync_lazytime(inode);
> 
> The checking of inode->dirtied_time_when for inode potentially without
> I_DIRTY_TIME set (and thus with unclear value of dirtied_time_when) is kind
> of odd. It is harmless but IMO still not a good practice. Can't we keep
> this condition as is and just call sync_lazytime()?

As in keeping the I_DIRTY_TIME in the caller?  Sure, I could do that.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.