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

Jan Kara
2025-11-24T17:36:37Z

On Mon 24-11-25 15:09:24, Christoph Hellwig wrote:
> 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.

Yes, keeping I_DIRTY_TIME check at this call site.

Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR