|
@@ -103,8 +103,6 @@ struct jffs2_full_dnode *jffs2_write_dnode(struct jffs2_sb_info *c, struct jffs2
|
|
fn->raw = raw;
|
|
fn->raw = raw;
|
|
|
|
|
|
raw->flash_offset = flash_ofs;
|
|
raw->flash_offset = flash_ofs;
|
|
- raw->__totlen = PAD(sizeof(*ri)+datalen);
|
|
|
|
- raw->next_phys = NULL;
|
|
|
|
|
|
|
|
if ((alloc_mode!=ALLOC_GC) && (je32_to_cpu(ri->version) < f->highest_version)) {
|
|
if ((alloc_mode!=ALLOC_GC) && (je32_to_cpu(ri->version) < f->highest_version)) {
|
|
BUG_ON(!retried);
|
|
BUG_ON(!retried);
|
|
@@ -133,7 +131,7 @@ struct jffs2_full_dnode *jffs2_write_dnode(struct jffs2_sb_info *c, struct jffs2
|
|
any node we write before the original intended end of
|
|
any node we write before the original intended end of
|
|
this node */
|
|
this node */
|
|
raw->flash_offset |= REF_OBSOLETE;
|
|
raw->flash_offset |= REF_OBSOLETE;
|
|
- jffs2_add_physical_node_ref(c, raw);
|
|
|
|
|
|
+ jffs2_add_physical_node_ref(c, raw, PAD(sizeof(*ri)+datalen));
|
|
jffs2_mark_node_obsolete(c, raw);
|
|
jffs2_mark_node_obsolete(c, raw);
|
|
} else {
|
|
} else {
|
|
printk(KERN_NOTICE "Not marking the space at 0x%08x as dirty because the flash driver returned retlen zero\n", raw->flash_offset);
|
|
printk(KERN_NOTICE "Not marking the space at 0x%08x as dirty because the flash driver returned retlen zero\n", raw->flash_offset);
|
|
@@ -191,7 +189,7 @@ struct jffs2_full_dnode *jffs2_write_dnode(struct jffs2_sb_info *c, struct jffs2
|
|
} else {
|
|
} else {
|
|
raw->flash_offset |= REF_NORMAL;
|
|
raw->flash_offset |= REF_NORMAL;
|
|
}
|
|
}
|
|
- jffs2_add_physical_node_ref(c, raw);
|
|
|
|
|
|
+ jffs2_add_physical_node_ref(c, raw, PAD(sizeof(*ri)+datalen));
|
|
|
|
|
|
/* Link into per-inode list */
|
|
/* Link into per-inode list */
|
|
spin_lock(&c->erase_completion_lock);
|
|
spin_lock(&c->erase_completion_lock);
|
|
@@ -259,8 +257,6 @@ struct jffs2_full_dirent *jffs2_write_dirent(struct jffs2_sb_info *c, struct jff
|
|
fd->raw = raw;
|
|
fd->raw = raw;
|
|
|
|
|
|
raw->flash_offset = flash_ofs;
|
|
raw->flash_offset = flash_ofs;
|
|
- raw->__totlen = PAD(sizeof(*rd)+namelen);
|
|
|
|
- raw->next_phys = NULL;
|
|
|
|
|
|
|
|
if ((alloc_mode!=ALLOC_GC) && (je32_to_cpu(rd->version) < f->highest_version)) {
|
|
if ((alloc_mode!=ALLOC_GC) && (je32_to_cpu(rd->version) < f->highest_version)) {
|
|
BUG_ON(!retried);
|
|
BUG_ON(!retried);
|
|
@@ -281,7 +277,7 @@ struct jffs2_full_dirent *jffs2_write_dirent(struct jffs2_sb_info *c, struct jff
|
|
if (retlen) {
|
|
if (retlen) {
|
|
raw->next_in_ino = NULL;
|
|
raw->next_in_ino = NULL;
|
|
raw->flash_offset |= REF_OBSOLETE;
|
|
raw->flash_offset |= REF_OBSOLETE;
|
|
- jffs2_add_physical_node_ref(c, raw);
|
|
|
|
|
|
+ jffs2_add_physical_node_ref(c, raw, PAD(sizeof(*rd)+namelen));
|
|
jffs2_mark_node_obsolete(c, raw);
|
|
jffs2_mark_node_obsolete(c, raw);
|
|
} else {
|
|
} else {
|
|
printk(KERN_NOTICE "Not marking the space at 0x%08x as dirty because the flash driver returned retlen zero\n", raw->flash_offset);
|
|
printk(KERN_NOTICE "Not marking the space at 0x%08x as dirty because the flash driver returned retlen zero\n", raw->flash_offset);
|
|
@@ -327,7 +323,7 @@ struct jffs2_full_dirent *jffs2_write_dirent(struct jffs2_sb_info *c, struct jff
|
|
}
|
|
}
|
|
/* Mark the space used */
|
|
/* Mark the space used */
|
|
raw->flash_offset |= REF_PRISTINE;
|
|
raw->flash_offset |= REF_PRISTINE;
|
|
- jffs2_add_physical_node_ref(c, raw);
|
|
|
|
|
|
+ jffs2_add_physical_node_ref(c, raw, PAD(sizeof(*rd)+namelen));
|
|
|
|
|
|
spin_lock(&c->erase_completion_lock);
|
|
spin_lock(&c->erase_completion_lock);
|
|
raw->next_in_ino = f->inocache->nodes;
|
|
raw->next_in_ino = f->inocache->nodes;
|