aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dcache.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2018-04-19 23:58:48 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2018-04-19 23:58:48 -0400
commit4fb48871409e2fcd375087d526d07f7600c88f94 (patch)
tree17fd362affd4a0825b90c56957a14f884a7f6c70 /fs/dcache.c
parentdput(): turn into explicit while() loop (diff)
downloadlinux-dev-4fb48871409e2fcd375087d526d07f7600c88f94.tar.xz
linux-dev-4fb48871409e2fcd375087d526d07f7600c88f94.zip
restore cond_resched() in shrink_dcache_parent()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/dcache.c')
-rw-r--r--fs/dcache.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/dcache.c b/fs/dcache.c
index c4d2234eccc3..60df712262c2 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);