From aba54da3d05e910199ea8255992c244c9abadd91 Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Tue, 19 Dec 2006 15:45:23 +0200 Subject: [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 Signed-off-by: David Woodhouse --- fs/jffs2/gc.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'fs') 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 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; -- cgit v1.2.1