Quantcast
Channel: lkml.org : Shesha Sreenivasamurthy
Viewing all articles
Browse latest Browse all 1267

Re: [PATCH] fs/dcache.c: re-add cond_resched() in shrink_dcache_pa ...

$
0
0
Linus Torvalds writes: (Summary) I'd rather just do it differently in shrink_dentry_list(): do it even for the empty list case by just doing it at the top of the loop: static void shrink_dentry_list(struct list_head *list) { - while (!list_empty(list)) { + while (cond_resched(), !list_empty(list)) { struct dentry *dentry, *parent; 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/dcache.c b/fs/dcache.c index 86d2de63461e..76507109cbcd 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -1049,11 +1049,9 @@ static bool shrink_lock_dentry(struct dentry *dentry) static void shrink_dentry_list(struct list_head *list) { - while (!list_empty(list)) { + while (cond_resched(), !list_empty(list)) { struct dentry *dentry, *parent;

Viewing all articles
Browse latest Browse all 1267

Trending Articles