Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2002-02-28 18:52:30 +0000
committerDavid Woodhouse <dwmw2@infradead.org>2002-02-28 18:52:30 +0000
commit4f8ea612247976e2af8678779859cd38f9f246a6 (patch)
tree1daf2fea814125d05d00dbad19aa445bce97abc7
parent08f129d2bf6e1dae9f0e8d7f8a5a9f993cd14282 (diff)
Missing parts of 2.5.6-pre1 JFFS2 merge.
-rw-r--r--fs/jffs2/nodemgmt.c11
-rw-r--r--fs/jffs2/read.c8
2 files changed, 17 insertions, 2 deletions
diff --git a/fs/jffs2/nodemgmt.c b/fs/jffs2/nodemgmt.c
index 55206f024ec0..e319471404ea 100644
--- a/fs/jffs2/nodemgmt.c
+++ b/fs/jffs2/nodemgmt.c
@@ -31,7 +31,7 @@
* provisions above, a recipient may use your version of this file
* under either the RHEPL or the GPL.
*
- * $Id: nodemgmt.c,v 1.45 2001/09/20 08:05:05 dwmw2 Exp $
+ * $Id: nodemgmt.c,v 1.45.2.1 2002/02/23 14:13:34 dwmw2 Exp $
*
*/
@@ -318,6 +318,15 @@ void jffs2_mark_node_obsolete(struct jffs2_sb_info *c, struct jffs2_raw_node_ref
ACCT_PARANOIA_CHECK(jeb);
+ if (c->flags & JFFS2_SB_FLAG_MOUNTING) {
+ /* Mount in progress. Don't muck about with the block
+ lists because they're not ready yet, and don't actually
+ obliterate nodes that look obsolete. If they weren't
+ marked obsolete on the flash at the time they _became_
+ obsolete, there was probably a reason for that. */
+ spin_unlock_bh(&c->erase_completion_lock);
+ return;
+ }
if (jeb == c->nextblock) {
D2(printk(KERN_DEBUG "Not moving nextblock 0x%08x to dirty/erase_pending list\n", jeb->offset));
} else if (jeb == c->gcblock) {
diff --git a/fs/jffs2/read.c b/fs/jffs2/read.c
index fd46ae954c22..541c500307fa 100644
--- a/fs/jffs2/read.c
+++ b/fs/jffs2/read.c
@@ -31,7 +31,7 @@
* provisions above, a recipient may use your version of this file
* under either the RHEPL or the GPL.
*
- * $Id: read.c,v 1.13 2001/05/01 16:24:44 dwmw2 Exp $
+ * $Id: read.c,v 1.13.2.1 2002/02/01 23:32:33 dwmw2 Exp $
*
*/
@@ -75,6 +75,12 @@ int jffs2_read_dnode(struct jffs2_sb_info *c, struct jffs2_full_dnode *fd, unsig
ret = -EIO;
goto out_ri;
}
+ /* There was a bug where we wrote hole nodes out with csize/dsize
+ swapped. Deal with it */
+ if (ri->compr == JFFS2_COMPR_ZERO && !ri->dsize && ri->csize) {
+ ri->dsize = ri->csize;
+ ri->csize = 0;
+ }
D1(if(ofs + len > ri->dsize) {
printk(KERN_WARNING "jffs2_read_dnode() asked for %d bytes at %d from %d-byte node\n", len, ofs, ri->dsize);