[JFFS2] Preallocate node refs for cleanmarker in summary scan
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Tue May 30 04:59:02 EDT 2006
Commit: 098a19811b483f8e047d8292641c88e776452de0
Parent: 13ba42df4a385d7b77d7aac32b93bdcd73e6d6e1
Author: David Woodhouse <dwmw2 at infradead.org>
AuthorDate: Tue May 30 09:00:14 2006 +0100
Commit: David Woodhouse <dwmw2 at infradead.org>
CommitDate: Tue May 30 09:00:14 2006 +0100
[JFFS2] Preallocate node refs for cleanmarker in summary scan
Signed-off-by: David Woodhouse <dwmw2 at infradead.org>
fs/jffs2/summary.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/fs/jffs2/summary.c b/fs/jffs2/summary.c
index 00e856e..51bf165 100644
--- a/fs/jffs2/summary.c
+++ b/fs/jffs2/summary.c
@@ -564,7 +564,6 @@ int jffs2_sum_scan_sumnode(struct jffs2_
struct jffs2_unknown_node crcnode;
int ret, ofs;
uint32_t crc;
- int err;
ofs = c->sector_size - sumsize;
@@ -606,16 +605,20 @@ int jffs2_sum_scan_sumnode(struct jffs2_
dbg_summary("Summary : CLEANMARKER node \n");
+ ret = jffs2_prealloc_raw_node_refs(c, jeb, 1);
+ if (ret)
+ return ret;
+
if (je32_to_cpu(summary->cln_mkr) != c->cleanmarker_size) {
dbg_summary("CLEANMARKER node has totlen 0x%x != normal 0x%x\n",
je32_to_cpu(summary->cln_mkr), c->cleanmarker_size);
- if ((err = jffs2_scan_dirty_space(c, jeb, PAD(je32_to_cpu(summary->cln_mkr)))))
- return err;
+ if ((ret = jffs2_scan_dirty_space(c, jeb, PAD(je32_to_cpu(summary->cln_mkr)))))
+ return ret;
} else if (jeb->first_node) {
dbg_summary("CLEANMARKER node not first node in block "
"(0x%08x)\n", jeb->offset);
- if ((err = jffs2_scan_dirty_space(c, jeb, PAD(je32_to_cpu(summary->cln_mkr)))))
- return err;
+ if ((ret = jffs2_scan_dirty_space(c, jeb, PAD(je32_to_cpu(summary->cln_mkr)))))
+ return ret;
} else {
jffs2_link_node_ref(c, jeb, jeb->offset | REF_NORMAL,
je32_to_cpu(summary->cln_mkr), NULL);
More information about the linux-mtd-cvs
mailing list