From: David Woodhouse Date: Thu, 25 May 2006 00:37:28 +0000 (+0100) Subject: [JFFS2] Allocate node_ref for wasted space when skipping to page boundary X-Git-Tag: v2.6.18-rc1~1105^2~54 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f560928baa605e8faaa3de6cc1b11ebb645e97db;p=linux-2.6 [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 --- diff --git a/fs/jffs2/scan.c b/fs/jffs2/scan.c index 3551c39d74..c25750aa85 100644 --- a/fs/jffs2/scan.c +++ b/fs/jffs2/scan.c @@ -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) {