aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/summary.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/jffs2/summary.c')
-rw-r--r--fs/jffs2/summary.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/fs/jffs2/summary.c b/fs/jffs2/summary.c
index 00e856e4fdbe..51bf1654ce3b 100644
--- a/fs/jffs2/summary.c
+++ b/fs/jffs2/summary.c
@@ -564,7 +564,6 @@ int jffs2_sum_scan_sumnode(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb
564 struct jffs2_unknown_node crcnode; 564 struct jffs2_unknown_node crcnode;
565 int ret, ofs; 565 int ret, ofs;
566 uint32_t crc; 566 uint32_t crc;
567 int err;
568 567
569 ofs = c->sector_size - sumsize; 568 ofs = c->sector_size - sumsize;
570 569
@@ -606,16 +605,20 @@ int jffs2_sum_scan_sumnode(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb
606 605
607 dbg_summary("Summary : CLEANMARKER node \n"); 606 dbg_summary("Summary : CLEANMARKER node \n");
608 607
608 ret = jffs2_prealloc_raw_node_refs(c, jeb, 1);
609 if (ret)
610 return ret;
611
609 if (je32_to_cpu(summary->cln_mkr) != c->cleanmarker_size) { 612 if (je32_to_cpu(summary->cln_mkr) != c->cleanmarker_size) {
610 dbg_summary("CLEANMARKER node has totlen 0x%x != normal 0x%x\n", 613 dbg_summary("CLEANMARKER node has totlen 0x%x != normal 0x%x\n",
611 je32_to_cpu(summary->cln_mkr), c->cleanmarker_size); 614 je32_to_cpu(summary->cln_mkr), c->cleanmarker_size);
612 if ((err = jffs2_scan_dirty_space(c, jeb, PAD(je32_to_cpu(summary->cln_mkr))))) 615 if ((ret = jffs2_scan_dirty_space(c, jeb, PAD(je32_to_cpu(summary->cln_mkr)))))
613 return err; 616 return ret;
614 } else if (jeb->first_node) { 617 } else if (jeb->first_node) {
615 dbg_summary("CLEANMARKER node not first node in block " 618 dbg_summary("CLEANMARKER node not first node in block "
616 "(0x%08x)\n", jeb->offset); 619 "(0x%08x)\n", jeb->offset);
617 if ((err = jffs2_scan_dirty_space(c, jeb, PAD(je32_to_cpu(summary->cln_mkr))))) 620 if ((ret = jffs2_scan_dirty_space(c, jeb, PAD(je32_to_cpu(summary->cln_mkr)))))
618 return err; 621 return ret;
619 } else { 622 } else {
620 jffs2_link_node_ref(c, jeb, jeb->offset | REF_NORMAL, 623 jffs2_link_node_ref(c, jeb, jeb->offset | REF_NORMAL,
621 je32_to_cpu(summary->cln_mkr), NULL); 624 je32_to_cpu(summary->cln_mkr), NULL);