Use the helper instead of direct inode I_DIRTY check to abstract details of inode dirtiness handling. This also properly triggers when only timestamps are dirty and lazytime is enabled (although I'm not sure if it really matters for this particular case in AFS). Signed-off-by: Jan Kara --- fs/afs/inode.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/afs/inode.c b/fs/afs/inode.c index 0733abff77a5..69982e7d7020 100644 --- a/fs/afs/inode.c +++ b/fs/afs/inode.c @@ -667,10 +667,8 @@ void afs_evict_inode(struct inode *inode) ASSERTCMP(inode->i_ino, ==, vnode->fid.vnode); - if ((S_ISDIR(inode->i_mode) || - S_ISLNK(inode->i_mode)) && - (inode_state_read_once(inode) & I_DIRTY) && - !sbi->dyn_root) { + if ((S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode)) && + inode_or_folios_dirty(inode) && !sbi->dyn_root) { struct writeback_control wbc = { .sync_mode = WB_SYNC_ALL, .for_sync = true, -- 2.53.0