Commit 4f8ea612 authored by David Woodhouse's avatar David Woodhouse

Missing parts of 2.5.6-pre1 JFFS2 merge.

parent 08f129d2
......@@ -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) {
......
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment