diff --git a/fs/dcache.c b/fs/dcache.c index af645c20db408fe35d182b0a6036e44a8cd5b110..fd4c6de17b9477c8827f6a3ddf9abd9cb489ed2a 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 @@ void dput(struct dentry *dentry) 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();