From 3b79673cfae93d0ed63eceb058bb26aba602a278 Mon Sep 17 00:00:00 2001
From: David Woodhouse <dwmw2@infradead.org>
Date: Mon, 22 May 2006 12:15:47 +0100
Subject: [PATCH] [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>
---
 fs/jffs2/nodelist.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/jffs2/nodelist.c b/fs/jffs2/nodelist.c
index 9a6ced05f894..7d563f938b1c 100644
--- a/fs/jffs2/nodelist.c
+++ b/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:
 		c->dirty_size += len;
-		jeb->used_size += len;
+		jeb->dirty_size += len;
 		break;
 	}
 	c->free_size -= len;
-- 
GitLab