提交 aba54da3 编写于 作者: A Artem Bityutskiy 提交者: David Woodhouse

[JFFS2] add cond_resched() when garbage collecting deletion dirent

We observe soft lockups when doing heavy test which creates
directory with a lot of direntries and deletes them. This
cycle is the reason fo this. Make it nicer and add cond_resched()
inside of it.
Signed-off-by: NArtem Bityutskiy <dedekind@infradead.org>
Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
上级 0bf3a9d8
......@@ -838,6 +838,8 @@ static int jffs2_garbage_collect_deletion_dirent(struct jffs2_sb_info *c, struct
for (raw = f->inocache->nodes; raw != (void *)f->inocache; raw = raw->next_in_ino) {
cond_resched();
/* We only care about obsolete ones */
if (!(ref_obsolete(raw)))
continue;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册