mtd/fs/jffs2 erase.c,1.49,1.50

David Woodhouse dwmw2 at infradead.org
Wed Feb 19 05:10:31 EST 2003


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

Modified Files:
	erase.c 
Log Message:
Fix accounting on erase failure

Index: erase.c
===================================================================
RCS file: /home/cvs/mtd/fs/jffs2/erase.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- erase.c	21 Jan 2003 18:11:28 -0000	1.49
+++ erase.c	19 Feb 2003 10:10:28 -0000	1.50
@@ -52,6 +52,8 @@
 		list_del(&jeb->list);
 		list_add(&jeb->list, &c->erase_pending_list);
 		c->erasing_size -= c->sector_size;
+		c->dirty_size += c->sector_size;
+		jeb->dirty_size = c->sector_size;
 		spin_unlock(&c->erase_completion_lock);
 		return;
 	}
@@ -85,6 +87,8 @@
 		list_del(&jeb->list);
 		list_add(&jeb->list, &c->erase_pending_list);
 		c->erasing_size -= c->sector_size;
+		c->dirty_size += c->sector_size;
+		jeb->dirty_size = c->sector_size;
 		spin_unlock(&c->erase_completion_lock);
 		return;
 	}





More information about the linux-mtd-cvs mailing list