mtd/fs/jffs2 background.c,1.52,1.53

gleixner at infradead.org gleixner at infradead.org
Fri May 20 15:24:38 EDT 2005


Update of /home/cvs/mtd/fs/jffs2
In directory phoenix.infradead.org:/tmp/cvs-serv24006

Modified Files:
	background.c 
Log Message:
Do not call wait_for_completion, when the gc task is not there. Prevent an oops when the gc thread was not started.

Index: background.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/background.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -r1.52 -r1.53
--- background.c	19 May 2005 16:18:08 -0000	1.52
+++ background.c	20 May 2005 19:24:34 -0000	1.53
@@ -56,13 +56,16 @@
 
 void jffs2_stop_garbage_collect_thread(struct jffs2_sb_info *c)
 {
+	int wait = 0
 	spin_lock(&c->erase_completion_lock);
 	if (c->gc_task) {
 		D1(printk(KERN_DEBUG "jffs2: Killing GC task %d\n", c->gc_task->pid));
 		send_sig(SIGKILL, c->gc_task, 1);
+		wait = 1;
 	}
 	spin_unlock(&c->erase_completion_lock);
-	wait_for_completion(&c->gc_thread_exit);
+	if (wait)
+		wait_for_completion(&c->gc_thread_exit);
 }
 
 static int jffs2_garbage_collect_thread(void *_c)





More information about the linux-mtd-cvs mailing list