fs/dcache.c: add cond_resched() to shrink_dcache_parent()
[platform/adaptation/renesas_rcar/renesas_kernel.git] / fs / dcache.c
index e8bc342..e689268 100644 (file)
@@ -1230,8 +1230,10 @@ void shrink_dcache_parent(struct dentry * parent)
        LIST_HEAD(dispose);
        int found;
 
-       while ((found = select_parent(parent, &dispose)) != 0)
+       while ((found = select_parent(parent, &dispose)) != 0) {
                shrink_dentry_list(&dispose);
+               cond_resched();
+       }
 }
 EXPORT_SYMBOL(shrink_dcache_parent);