Browse Source

[JFFS2] Fix accounting error in jffs2_link_node_ref()

When filing REF_OBSOLETE nodes, we'd add their size to the global
'dirty_size' count, but then to the eraseblock's 'used_size' count.
That's not clever.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
David Woodhouse 19 years ago
parent
commit
3b79673cfa
1 changed files with 1 additions and 1 deletions
  1. 1 1
      fs/jffs2/nodelist.c

+ 1 - 1
fs/jffs2/nodelist.c

@@ -1079,7 +1079,7 @@ void jffs2_link_node_ref(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb,
 
 
 	case REF_OBSOLETE:
 	case REF_OBSOLETE:
 		c->dirty_size += len;
 		c->dirty_size += len;
-		jeb->used_size += len;
+		jeb->dirty_size += len;
 		break;
 		break;
 	}
 	}
 	c->free_size -= len;
 	c->free_size -= len;