[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: jffs_erasable_size: offset = 0x0034b000




simonk@xxxxxxx.com said:
>  What bug fix is that?

I didn't forward it because the change entry says it's a 2.3-only bug.

revision 1.17
date: 2000/07/06 20:35:19;  author: prumpf;  state: Exp;  lines: +5 -2
Fixed 2.3-only race (write_super was called while we're doing a garbage
collection and started another garbage collection which resulted in us
erasing the same memory twice).  Not using atomic operations for no_call_gc
still looks racy to me.

--- inode-v23.c	2000/07/06 14:38:10	1.16
+++ inode-v23.c	2000/07/06 20:35:19	1.17
@@ -1540,7 +1540,10 @@
 jffs_write_super(struct super_block *sb)
 {
 #ifdef USE_GC
-	jffs_garbage_collect((struct jffs_control *)sb->u.generic_sbp);
+	struct jffs_control *c = (struct jffs_control *)sb->u.generic_sbp;
+	
+	if(!c->fmc->no_call_gc)
+		jffs_garbage_collect(c);
 #endif
 }
 


--
dwmw2