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

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Tue Dec 19 09:59:01 EST 2006


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=aba54da3d05e910199ea8255992c244c9abadd91
Commit:     aba54da3d05e910199ea8255992c244c9abadd91
Parent:     0bf3a9d82adc62fb05e3f108ddd46eb088960f26
Author:     Artem Bityutskiy <dedekind at infradead.org>
AuthorDate: Tue Dec 19 15:45:23 2006 +0200
Committer:  David Woodhouse <dwmw2 at infradead.org>
CommitDate: Tue Dec 19 14:20:16 2006 +0000

    [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 at infradead.org>
    Signed-off-by: David Woodhouse <dwmw2 at infradead.org>
---
 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 daff334..3a3cf22 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;



More information about the linux-mtd-cvs mailing list