Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 4466
b: refs/heads/master
c: 3118db3
h: refs/heads/master
v: v3
  • Loading branch information
Estelle Hammache authored and Thomas Gleixner committed May 23, 2005
1 parent 6f721a6 commit 29544aa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7f716cf3f9cc9dd420b9c75071559017812df6d2
refs/heads/master: 3118db3dfe7c16284d1d578e628fd87639b00731
9 changes: 6 additions & 3 deletions trunk/fs/jffs2/nodemgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*
* For licensing information, see the file 'LICENCE' in this directory.
*
* $Id: nodemgmt.c,v 1.115 2004/11/22 11:07:21 dwmw2 Exp $
* $Id: nodemgmt.c,v 1.116 2005/01/24 21:30:22 hammache Exp $
*
*/

Expand Down Expand Up @@ -308,7 +308,10 @@ int jffs2_add_physical_node_ref(struct jffs2_sb_info *c, struct jffs2_raw_node_r

D1(printk(KERN_DEBUG "jffs2_add_physical_node_ref(): Node at 0x%x(%d), size 0x%x\n", ref_offset(new), ref_flags(new), len));
#if 1
if (jeb != c->nextblock || (ref_offset(new)) != jeb->offset + (c->sector_size - jeb->free_size)) {
/* we could get some obsolete nodes after nextblock was refiled
in wbuf.c */
if ( (c->nextblock || !ref_obsolete(new))
&&(jeb != c->nextblock || (ref_offset(new)) != jeb->offset + (c->sector_size - jeb->free_size))) {
printk(KERN_WARNING "argh. node added in wrong place\n");
jffs2_free_raw_node_ref(new);
return -EINVAL;
Expand All @@ -332,7 +335,7 @@ int jffs2_add_physical_node_ref(struct jffs2_sb_info *c, struct jffs2_raw_node_r
c->used_size += len;
}

if (!jeb->free_size && !jeb->dirty_size) {
if (!jeb->free_size && !jeb->dirty_size && !jeb->wasted_size) {
/* If it lives on the dirty_list, jffs2_reserve_space will put it there */
D1(printk(KERN_DEBUG "Adding full erase block at 0x%08x to clean_list (free 0x%08x, dirty 0x%08x, used 0x%08x\n",
jeb->offset, jeb->free_size, jeb->dirty_size, jeb->used_size));
Expand Down

0 comments on commit 29544aa

Please sign in to comment.