提交 f3c6ba98 编写于 作者: K Kentaro Makita 提交者: Linus Torvalds

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: NKentaro Makita <k-makita@np.css.fujitsu.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 a76eef95
......@@ -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)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册