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

Christoph Hellwig hch at lst.de
Mon Nov 24 06:09:24 PST 2025


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.




More information about the linux-mtd mailing list