From: Al Viro Date: Fri, 20 Apr 2018 03:58:48 +0000 (-0400) Subject: restore cond_resched() in shrink_dcache_parent() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=4fb48871409e2fcd375087d526d07f7600c88f94;p=linux.git restore cond_resched() in shrink_dcache_parent() Signed-off-by: Al Viro --- diff --git a/fs/dcache.c b/fs/dcache.c index c4d2234eccc36..60df712262c2e 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -1473,10 +1473,15 @@ void shrink_dcache_parent(struct dentry *parent) data.found = 0; d_walk(parent, &data, select_collect); + + if (!list_empty(&data.dispose)) { + shrink_dentry_list(&data.dispose); + continue; + } + + cond_resched(); if (!data.found) break; - - shrink_dentry_list(&data.dispose); } } EXPORT_SYMBOL(shrink_dcache_parent);