summaryrefslogtreecommitdiffstats
path: root/fs/dcache.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2018-04-15 18:28:48 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2018-04-15 23:36:58 -0400
commit9c5f1d30199d09f7e2776c24ecb63c843ada876d (patch)
treeb00ee3a76635657ab4df363562f06b6d77af3521 /fs/dcache.c
parent3a8e3611e0babd460bae2fa57674b9a208422217 (diff)
downloadlinux-9c5f1d30199d09f7e2776c24ecb63c843ada876d.tar.bz2
dcache: move cond_resched() into the end of __dentry_kill()
cond_resched() in shrink_dentry_list() is too early Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/dcache.c')
-rw-r--r--fs/dcache.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/dcache.c b/fs/dcache.c
index af645c20db40..fd4c6de17b94 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -580,6 +580,7 @@ static void __dentry_kill(struct dentry *dentry)
spin_unlock(&dentry->d_lock);
if (likely(can_free))
dentry_free(dentry);
+ cond_resched();
}
static struct dentry *__lock_parent(struct dentry *dentry)
@@ -849,7 +850,6 @@ repeat:
dentry = dentry_kill(dentry);
if (dentry) {
- cond_resched();
goto repeat;
}
}
@@ -1052,8 +1052,6 @@ static void shrink_dentry_list(struct list_head *list)
while (!list_empty(list)) {
struct dentry *dentry, *parent;
- cond_resched();
-
dentry = list_entry(list->prev, struct dentry, d_lru);
spin_lock(&dentry->d_lock);
rcu_read_lock();