From: Kentaro Makita Date: Sat, 26 Jul 2008 02:44:40 +0000 (-0700) Subject: vfs: add cond_resched_lock while scanning dentry LRU lists X-Git-Tag: v2.6.27-rc1~203 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=f3c6ba986ab4527b6dfacf9f3b9e40f72466a8b2;p=linux.git vfs: add cond_resched_lock while scanning dentry LRU lists Add cond_resched_lock(&dcache_lock) while scanning LRU lists on superblocks in __shrink_dcache_sb() Signed-off-by: Kentaro Makita Cc: Al Viro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/dcache.c b/fs/dcache.c index 3818d6ab76ca..f2584d22cb45 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -487,6 +487,7 @@ static void __shrink_dcache_sb(struct super_block *sb, int *count, int flags) if (!cnt) break; } + cond_resched_lock(&dcache_lock); } } while (!list_empty(&tmp)) {