Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 68447
b: refs/heads/master
c: f79c449
h: refs/heads/master
i:
  68445: 21009d4
  68443: 0cba61a
  68439: fb971fb
  68431: 0c303e1
  68415: f8c7535
v: v3
  • Loading branch information
Joakim Tjernlund authored and David Woodhouse committed Jun 28, 2007
1 parent cff83a0 commit e1c4ee4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fab2c399129273713b7dcc6a54cef17ca124a47f
refs/heads/master: f79c44980aae3f50fe73e50789641df265953cc6
12 changes: 12 additions & 0 deletions trunk/fs/jffs2/write.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,12 @@ struct jffs2_full_dnode *jffs2_write_dnode(struct jffs2_sb_info *c, struct jffs2
flash_ofs |= REF_NORMAL;
}
fn->raw = jffs2_add_physical_node_ref(c, flash_ofs, PAD(sizeof(*ri)+datalen), f->inocache);
if (IS_ERR(fn->raw)) {
void *hold_err = fn->raw;
/* Release the full_dnode which is now useless, and return */
jffs2_free_full_dnode(fn);
return ERR_PTR(PTR_ERR(hold_err));
}
fn->ofs = je32_to_cpu(ri->offset);
fn->size = je32_to_cpu(ri->dsize);
fn->frags = 0;
Expand Down Expand Up @@ -291,6 +297,12 @@ struct jffs2_full_dirent *jffs2_write_dirent(struct jffs2_sb_info *c, struct jff
}
/* Mark the space used */
fd->raw = jffs2_add_physical_node_ref(c, flash_ofs | REF_PRISTINE, PAD(sizeof(*rd)+namelen), f->inocache);
if (IS_ERR(fd->raw)) {
void *hold_err = fd->raw;
/* Release the full_dirent which is now useless, and return */
jffs2_free_full_dirent(fd);
return ERR_PTR(PTR_ERR(hold_err));
}

if (retried) {
jffs2_dbg_acct_sanity_check(c,NULL);
Expand Down

0 comments on commit e1c4ee4

Please sign in to comment.