]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[JFFS2] Allocate node_ref for wasted space when skipping to page boundary
authorDavid Woodhouse <dwmw2@infradead.org>
Thu, 25 May 2006 00:37:28 +0000 (01:37 +0100)
committerDavid Woodhouse <dwmw2@infradead.org>
Thu, 25 May 2006 00:37:28 +0000 (01:37 +0100)
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@infradead.org>
fs/jffs2/scan.c

index 3551c39d74725953eca659b89923c4d2dd869782..c25750aa85e3aa9a844473e15c9d7ca934a8d18b 100644 (file)
@@ -244,11 +244,8 @@ int jffs2_scan_medium(struct jffs2_sb_info *c)
 
                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) {