Skip to content

Commit 4fb4887

Browse files
author
Al Viro
committed
restore cond_resched() in shrink_dcache_parent()
Signed-off-by: Al Viro <[email protected]>
1 parent 1088a64 commit 4fb4887

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

fs/dcache.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1473,10 +1473,15 @@ void shrink_dcache_parent(struct dentry *parent)
14731473
data.found = 0;
14741474

14751475
d_walk(parent, &data, select_collect);
1476+
1477+
if (!list_empty(&data.dispose)) {
1478+
shrink_dentry_list(&data.dispose);
1479+
continue;
1480+
}
1481+
1482+
cond_resched();
14761483
if (!data.found)
14771484
break;
1478-
1479-
shrink_dentry_list(&data.dispose);
14801485
}
14811486
}
14821487
EXPORT_SYMBOL(shrink_dcache_parent);

0 commit comments

Comments
 (0)