Skip to content

Commit

Permalink
restore cond_resched() in shrink_dcache_parent()
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Al Viro committed Apr 20, 2018
1 parent 1088a64 commit 4fb4887
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions fs/dcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4fb4887

Please sign in to comment.