Skip to content

Commit f560928

Browse files
committed
[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 <[email protected]>
1 parent 12efdde commit f560928

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

fs/jffs2/scan.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -244,11 +244,8 @@ int jffs2_scan_medium(struct jffs2_sb_info *c)
244244

245245
D1(printk(KERN_DEBUG "jffs2_scan_medium(): Skipping %d bytes in nextblock to ensure page alignment\n",
246246
skip));
247-
c->nextblock->wasted_size += skip;
248-
c->wasted_size += skip;
249-
250-
c->nextblock->free_size -= skip;
251-
c->free_size -= skip;
247+
jffs2_prealloc_raw_node_refs(c, 1);
248+
jffs2_scan_dirty_space(c, c->nextblock, skip);
252249
}
253250
#endif
254251
if (c->nr_erasing_blocks) {

0 commit comments

Comments
 (0)