diff options
author | Artem Bityutskiy <dedekind@infradead.org> | 2006-12-19 08:45:23 -0500 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2006-12-19 09:20:16 -0500 |
commit | aba54da3d05e910199ea8255992c244c9abadd91 (patch) | |
tree | fc634ff11819f2f94ef23478d6471757dc21c6d6 /fs/jffs2 | |
parent | 0bf3a9d82adc62fb05e3f108ddd46eb088960f26 (diff) |
[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: Artem Bityutskiy <dedekind@infradead.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'fs/jffs2')
-rw-r--r-- | fs/jffs2/gc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/jffs2/gc.c b/fs/jffs2/gc.c index daff3341ff92..3a3cf225981f 100644 --- a/fs/jffs2/gc.c +++ b/fs/jffs2/gc.c | |||
@@ -838,6 +838,8 @@ static int jffs2_garbage_collect_deletion_dirent(struct jffs2_sb_info *c, struct | |||
838 | 838 | ||
839 | for (raw = f->inocache->nodes; raw != (void *)f->inocache; raw = raw->next_in_ino) { | 839 | for (raw = f->inocache->nodes; raw != (void *)f->inocache; raw = raw->next_in_ino) { |
840 | 840 | ||
841 | cond_resched(); | ||
842 | |||
841 | /* We only care about obsolete ones */ | 843 | /* We only care about obsolete ones */ |
842 | if (!(ref_obsolete(raw))) | 844 | if (!(ref_obsolete(raw))) |
843 | continue; | 845 | continue; |