Message ID | 20210109075903.208222-9-ebiggers@kernel.org (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
Series | lazytime fix and cleanups | expand |
On Fri, Jan 08, 2021 at 11:58:59PM -0800, Eric Biggers wrote: > From: Eric Biggers <ebiggers@google.com> > > wbc->for_sync implies wbc->sync_mode == WB_SYNC_ALL, so there's no need > to check for both. Just check for WB_SYNC_ALL. > > Signed-off-by: Eric Biggers <ebiggers@google.com> Looks good, Reviewed-by: Christoph Hellwig <hch@lst.de>
On Fri 08-01-21 23:58:59, Eric Biggers wrote: > From: Eric Biggers <ebiggers@google.com> > > wbc->for_sync implies wbc->sync_mode == WB_SYNC_ALL, so there's no need > to check for both. Just check for WB_SYNC_ALL. > > Signed-off-by: Eric Biggers <ebiggers@google.com> Looks good to me. Feel free to add: Reviewed-by: Jan Kara <jack@suse.cz> Honza > --- > fs/fs-writeback.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c > index 80ee9816d9df5..cee1df6e3bd43 100644 > --- a/fs/fs-writeback.c > +++ b/fs/fs-writeback.c > @@ -1479,7 +1479,7 @@ __writeback_single_inode(struct inode *inode, struct writeback_control *wbc) > * change I_DIRTY_TIME into I_DIRTY_SYNC. > */ > if ((inode->i_state & I_DIRTY_TIME) && > - (wbc->sync_mode == WB_SYNC_ALL || wbc->for_sync || > + (wbc->sync_mode == WB_SYNC_ALL || > time_after(jiffies, inode->dirtied_time_when + > dirtytime_expire_interval * HZ))) { > trace_writeback_lazytime(inode); > -- > 2.30.0 >
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 80ee9816d9df5..cee1df6e3bd43 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -1479,7 +1479,7 @@ __writeback_single_inode(struct inode *inode, struct writeback_control *wbc) * change I_DIRTY_TIME into I_DIRTY_SYNC. */ if ((inode->i_state & I_DIRTY_TIME) && - (wbc->sync_mode == WB_SYNC_ALL || wbc->for_sync || + (wbc->sync_mode == WB_SYNC_ALL || time_after(jiffies, inode->dirtied_time_when + dirtytime_expire_interval * HZ))) { trace_writeback_lazytime(inode);