[JFFS2] Fix accounting error in jffs2_link_node_ref()

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Mon May 22 07:59:01 EDT 2006


Commit:     3b79673cfae93d0ed63eceb058bb26aba602a278
Parent:     06c6764b5830798c39617b24497cade90451592f
Author:     David Woodhouse <dwmw2 at infradead.org>
AuthorDate: Mon May 22 12:15:47 2006 +0100
Commit:     David Woodhouse <dwmw2 at infradead.org>
CommitDate: Mon May 22 12:15:47 2006 +0100

    [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 at infradead.org>

 fs/jffs2/nodelist.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/jffs2/nodelist.c b/fs/jffs2/nodelist.c
index 9a6ced0..7d563f9 100644
--- a/fs/jffs2/nodelist.c
+++ b/fs/jffs2/nodelist.c
@@ -1079,7 +1079,7 @@ #endif
 
 	case REF_OBSOLETE:
 		c->dirty_size += len;
-		jeb->used_size += len;
+		jeb->dirty_size += len;
 		break;
 	}
 	c->free_size -= len;



More information about the linux-mtd-cvs mailing list