mtd/fs/jffs2 background.c,1.45,1.46

David Woodhouse dwmw2 at infradead.org
Mon Oct 13 16:57:48 EDT 2003


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

Modified Files:
	background.c 
Log Message:
Add swsusp support

Index: background.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/background.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- background.c	9 Oct 2003 13:42:42 -0000	1.45
+++ background.c	13 Oct 2003 20:57:46 -0000	1.46
@@ -19,6 +19,7 @@
 #include <linux/completion.h>
 #include <linux/sched.h>
 #include <linux/unistd.h>
+#include <linux/suspend.h>
 #include "nodelist.h"
 
 
@@ -75,13 +76,11 @@
 	struct jffs2_sb_info *c = _c;
 
 	daemonize("jffs2_gcd_mtd%d", c->mtd->index);
-	
-	c->gc_task = current;
-
 	allow_signal(SIGKILL);
 	allow_signal(SIGSTOP);
 	allow_signal(SIGCONT);
-	
+
+	c->gc_task = current;
 	up(&c->gc_thread_start);
 
 	set_user_nice(current, 10);
@@ -97,6 +96,13 @@
 			   matter - We don't care if we miss a wakeup, because the GC thread
 			   is only an optimisation anyway. */
 			schedule();
+		}
+
+		if (current->flags & PF_FREEZE) {
+			refrigerator(0);
+			/* refrigerator() should recalc sigpending for us
+			   but doesn't. No matter - allow_signal() will. */
+			continue;
 		}
 
 		cond_resched();




More information about the linux-mtd-cvs mailing list