|
@@ -1160,11 +1160,12 @@ void shrink_dcache_sb(struct super_block *sb)
|
|
LIST_HEAD(dispose);
|
|
LIST_HEAD(dispose);
|
|
|
|
|
|
freed = list_lru_walk(&sb->s_dentry_lru,
|
|
freed = list_lru_walk(&sb->s_dentry_lru,
|
|
- dentry_lru_isolate_shrink, &dispose, UINT_MAX);
|
|
|
|
|
|
+ dentry_lru_isolate_shrink, &dispose, 1024);
|
|
|
|
|
|
this_cpu_sub(nr_dentry_unused, freed);
|
|
this_cpu_sub(nr_dentry_unused, freed);
|
|
shrink_dentry_list(&dispose);
|
|
shrink_dentry_list(&dispose);
|
|
- } while (freed > 0);
|
|
|
|
|
|
+ cond_resched();
|
|
|
|
+ } while (list_lru_count(&sb->s_dentry_lru) > 0);
|
|
}
|
|
}
|
|
EXPORT_SYMBOL(shrink_dcache_sb);
|
|
EXPORT_SYMBOL(shrink_dcache_sb);
|
|
|
|
|