diff --git a/fs/dcache.c b/fs/dcache.c index a12516c5d2f0..7a5e6f9717f5 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -2502,7 +2502,7 @@ retry: } hlist_bl_lock(b); - if (unlikely(parent->d_inode->i_dir_seq != seq)) { + if (unlikely(READ_ONCE(parent->d_inode->i_dir_seq) != seq)) { hlist_bl_unlock(b); rcu_read_unlock(); goto retry;