--- linux-4.9.37/fs/dcache.c	2017-07-12 16:42:41.000000000 +0300
+++ linux-4.9.y/fs/dcache.c	2021-06-07 13:01:34.000000000 +0300
@@ -1137,7 +1137,12 @@
 
 		this_cpu_sub(nr_dentry_unused, freed);
 		shrink_dentry_list(&dispose);
-	} while (freed > 0);
+#ifdef CONFIG_GOKE_MC		
+		cond_resched();
+	} while (list_lru_count(&sb->s_dentry_lru) > 0);
+#else
+	} while (freed > 0);	
+#endif	
 }
 EXPORT_SYMBOL(shrink_dcache_sb);