[JFFS2] Correct accounting of erroneous cleanmarkers and failed summaries.
It should all be counted as dirty space, not wasted and _definitely_ not unchecked. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
This commit is contained in:
parent
f1f9671bd8
commit
fb9fbbcc93
|
@ -617,11 +617,11 @@ int jffs2_sum_scan_sumnode(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb
|
||||||
if (je32_to_cpu(summary->cln_mkr) != c->cleanmarker_size) {
|
if (je32_to_cpu(summary->cln_mkr) != c->cleanmarker_size) {
|
||||||
dbg_summary("CLEANMARKER node has totlen 0x%x != normal 0x%x\n",
|
dbg_summary("CLEANMARKER node has totlen 0x%x != normal 0x%x\n",
|
||||||
je32_to_cpu(summary->cln_mkr), c->cleanmarker_size);
|
je32_to_cpu(summary->cln_mkr), c->cleanmarker_size);
|
||||||
UNCHECKED_SPACE(PAD(je32_to_cpu(summary->cln_mkr)));
|
DIRTY_SPACE(PAD(je32_to_cpu(summary->cln_mkr)));
|
||||||
} else if (jeb->first_node) {
|
} else if (jeb->first_node) {
|
||||||
dbg_summary("CLEANMARKER node not first node in block "
|
dbg_summary("CLEANMARKER node not first node in block "
|
||||||
"(0x%08x)\n", jeb->offset);
|
"(0x%08x)\n", jeb->offset);
|
||||||
UNCHECKED_SPACE(PAD(je32_to_cpu(summary->cln_mkr)));
|
DIRTY_SPACE(PAD(je32_to_cpu(summary->cln_mkr)));
|
||||||
} else {
|
} else {
|
||||||
struct jffs2_raw_node_ref *marker_ref = jffs2_alloc_raw_node_ref();
|
struct jffs2_raw_node_ref *marker_ref = jffs2_alloc_raw_node_ref();
|
||||||
|
|
||||||
|
@ -800,7 +800,7 @@ static int jffs2_sum_write_data(struct jffs2_sb_info *c, struct jffs2_eraseblock
|
||||||
infosize, jeb->offset + c->sector_size - jeb->free_size, ret, retlen);
|
infosize, jeb->offset + c->sector_size - jeb->free_size, ret, retlen);
|
||||||
|
|
||||||
c->summary->sum_size = JFFS2_SUMMARY_NOSUM_SIZE;
|
c->summary->sum_size = JFFS2_SUMMARY_NOSUM_SIZE;
|
||||||
WASTED_SPACE(infosize);
|
DIRTY_SPACE(infosize);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue