fs/dcache: Re-use value stored to dentry->d_flags instead of re-reading
[linux-2.6-block.git] / fs / dcache.c
index 71a8e943a0fa506c93fd7f11400de9a5d7e23e01..407095188f83a7faeec0a8c0542fb6598952b7be 100644 (file)
@@ -355,7 +355,7 @@ static inline void __d_clear_type_and_inode(struct dentry *dentry)
        flags &= ~DCACHE_ENTRY_TYPE;
        WRITE_ONCE(dentry->d_flags, flags);
        dentry->d_inode = NULL;
-       if (dentry->d_flags & DCACHE_LRU_LIST)
+       if (flags & DCACHE_LRU_LIST)
                this_cpu_inc(nr_dentry_negative);
 }