]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/dcache.c
[PATCH] missing unused dentry in prune_dcache()?
[linux-2.6-omap-h63xx.git] / fs / dcache.c
index a1ff91eef10810c50583962ae671f07e14737bf6..a5b76b647c6da601f66a99bdb4a62dd4bf849dff 100644 (file)
@@ -478,11 +478,12 @@ static void prune_dcache(int count, struct super_block *sb)
                        up_read(s_umount);
                }
                spin_unlock(&dentry->d_lock);
-               /* Cannot remove the first dentry, and it isn't appropriate
-                * to move it to the head of the list, so give up, and try
-                * later
+               /*
+                * Insert dentry at the head of the list as inserting at the
+                * tail leads to a cycle.
                 */
-               break;
+               list_add(&dentry->d_lru, &dentry_unused);
+               dentry_stat.nr_unused++;
        }
        spin_unlock(&dcache_lock);
 }