[JFFS2] Allocate node_ref for wasted space when skipping to page boundary

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Thu May 25 08:59:01 EDT 2006


Commit:     f560928baa605e8faaa3de6cc1b11ebb645e97db
Parent:     12efdde3139c568a59561b69865fd14f37c75603
Author:     David Woodhouse <dwmw2 at infradead.org>
AuthorDate: Thu May 25 01:37:28 2006 +0100
Commit:     David Woodhouse <dwmw2 at infradead.org>
CommitDate: Thu May 25 01:37:28 2006 +0100

    [JFFS2] Allocate node_ref for wasted space when skipping to page boundary
    
    One more place where we were changing the accounting info without
    actually allocating a ref for the lost space...
    
    Signed-off-by: David Woodhouse <dwmw2 at infradead.org>

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

diff --git a/fs/jffs2/scan.c b/fs/jffs2/scan.c
index 3551c39..c25750a 100644
--- a/fs/jffs2/scan.c
+++ b/fs/jffs2/scan.c
@@ -244,11 +244,8 @@ #ifdef CONFIG_JFFS2_FS_WRITEBUFFER
 
 		D1(printk(KERN_DEBUG "jffs2_scan_medium(): Skipping %d bytes in nextblock to ensure page alignment\n",
 			  skip));
-		c->nextblock->wasted_size += skip;
-		c->wasted_size += skip;
-
-		c->nextblock->free_size -= skip;
-		c->free_size -= skip;
+		jffs2_prealloc_raw_node_refs(c, 1);
+		jffs2_scan_dirty_space(c, c->nextblock, skip);
 	}
 #endif
 	if (c->nr_erasing_blocks) {



More information about the linux-mtd-cvs mailing list