local64.h: make <asm/local64.h> mandatory
[linux-2.6-microblaze.git] / fs / dcache.c
index ea04858..97e81a8 100644 (file)
@@ -793,10 +793,17 @@ static inline bool fast_dput(struct dentry *dentry)
         * a reference to the dentry and change that, but
         * our work is done - we can leave the dentry
         * around with a zero refcount.
+        *
+        * Nevertheless, there are two cases that we should kill
+        * the dentry anyway.
+        * 1. free disconnected dentries as soon as their refcount
+        *    reached zero.
+        * 2. free dentries if they should not be cached.
         */
        smp_rmb();
        d_flags = READ_ONCE(dentry->d_flags);
-       d_flags &= DCACHE_REFERENCED | DCACHE_LRU_LIST | DCACHE_DISCONNECTED;
+       d_flags &= DCACHE_REFERENCED | DCACHE_LRU_LIST |
+                       DCACHE_DISCONNECTED | DCACHE_DONTCACHE;
 
        /* Nothing to do? Dropping the reference was all we needed? */
        if (d_flags == (DCACHE_REFERENCED | DCACHE_LRU_LIST) && !d_unhashed(dentry))