aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/scan.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/jffs2/scan.c')
-rw-r--r--fs/jffs2/scan.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/jffs2/scan.c b/fs/jffs2/scan.c
index 3fb0e7e82cf2..42c1ff21d352 100644
--- a/fs/jffs2/scan.c
+++ b/fs/jffs2/scan.c
@@ -67,8 +67,11 @@ static inline uint32_t EMPTY_SCAN_SIZE(uint32_t sector_size) {
67 67
68static int file_dirty(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb) 68static int file_dirty(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb)
69{ 69{
70 int ret = jffs2_scan_dirty_space(c, jeb, jeb->free_size); 70 int ret;
71 if (ret) 71
72 if ((ret = jffs2_prealloc_raw_node_refs(c, jeb, 1)))
73 return ret;
74 if ((ret = jffs2_scan_dirty_space(c, jeb, jeb->free_size)))
72 return ret; 75 return ret;
73 /* Turned wasted size into dirty, since we apparently 76 /* Turned wasted size into dirty, since we apparently
74 think it's recoverable now. */ 77 think it's recoverable now. */
@@ -559,6 +562,8 @@ static int jffs2_scan_eraseblock (struct jffs2_sb_info *c, struct jffs2_eraseblo
559 if (ofs) { 562 if (ofs) {
560 D1(printk(KERN_DEBUG "Free space at %08x ends at %08x\n", jeb->offset, 563 D1(printk(KERN_DEBUG "Free space at %08x ends at %08x\n", jeb->offset,
561 jeb->offset + ofs)); 564 jeb->offset + ofs));
565 if ((err = jffs2_prealloc_raw_node_refs(c, jeb, 1)))
566 return err;
562 if ((err = jffs2_scan_dirty_space(c, jeb, ofs))) 567 if ((err = jffs2_scan_dirty_space(c, jeb, ofs)))
563 return err; 568 return err;
564 } 569 }