summaryrefslogtreecommitdiff
path: root/fs/jffs2/write.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/jffs2/write.c')
-rw-r--r--fs/jffs2/write.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/fs/jffs2/write.c b/fs/jffs2/write.c
index ff2b00b604ec..4462541d11f8 100644
--- a/fs/jffs2/write.c
+++ b/fs/jffs2/write.c
@@ -103,8 +103,6 @@ struct jffs2_full_dnode *jffs2_write_dnode(struct jffs2_sb_info *c, struct jffs2
fn->raw = raw;
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)) {
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
this node */
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);
} else {
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 {
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 */
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;
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)) {
BUG_ON(!retried);
@@ -281,7 +277,7 @@ struct jffs2_full_dirent *jffs2_write_dirent(struct jffs2_sb_info *c, struct jff
if (retlen) {
raw->next_in_ino = NULL;
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);
} else {
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 */
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);
raw->next_in_ino = f->inocache->nodes;