提交 9c5f1d30 编写于 作者: A Al Viro

dcache: move cond_resched() into the end of __dentry_kill()

cond_resched() in shrink_dentry_list() is too early
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 3a8e3611
...@@ -580,6 +580,7 @@ static void __dentry_kill(struct dentry *dentry) ...@@ -580,6 +580,7 @@ static void __dentry_kill(struct dentry *dentry)
spin_unlock(&dentry->d_lock); spin_unlock(&dentry->d_lock);
if (likely(can_free)) if (likely(can_free))
dentry_free(dentry); dentry_free(dentry);
cond_resched();
} }
static struct dentry *__lock_parent(struct dentry *dentry) static struct dentry *__lock_parent(struct dentry *dentry)
...@@ -849,7 +850,6 @@ void dput(struct dentry *dentry) ...@@ -849,7 +850,6 @@ void dput(struct dentry *dentry)
dentry = dentry_kill(dentry); dentry = dentry_kill(dentry);
if (dentry) { if (dentry) {
cond_resched();
goto repeat; goto repeat;
} }
} }
...@@ -1052,8 +1052,6 @@ static void shrink_dentry_list(struct list_head *list) ...@@ -1052,8 +1052,6 @@ static void shrink_dentry_list(struct list_head *list)
while (!list_empty(list)) { while (!list_empty(list)) {
struct dentry *dentry, *parent; struct dentry *dentry, *parent;
cond_resched();
dentry = list_entry(list->prev, struct dentry, d_lru); dentry = list_entry(list->prev, struct dentry, d_lru);
spin_lock(&dentry->d_lock); spin_lock(&dentry->d_lock);
rcu_read_lock(); rcu_read_lock();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册