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, 9 insertions, 0 deletions
diff --git a/fs/jffs2/scan.c b/fs/jffs2/scan.c
index 31c1475d922a..7fb45bd4915c 100644
--- a/fs/jffs2/scan.c
+++ b/fs/jffs2/scan.c
@@ -734,6 +734,15 @@ scan_more:
734 ofs += 4; 734 ofs += 4;
735 continue; 735 continue;
736 } 736 }
737 /* Due to poor choice of crc32 seed, an all-zero node will have a correct CRC */
738 if (!je32_to_cpu(node->hdr_crc) && !je16_to_cpu(node->nodetype) &&
739 !je16_to_cpu(node->magic) && !je32_to_cpu(node->totlen)) {
740 noisy_printk(&noise, "jffs2_scan_eraseblock(): All zero node header at 0x%08x.\n", ofs);
741 if ((err = jffs2_scan_dirty_space(c, jeb, 4)))
742 return err;
743 ofs += 4;
744 continue;
745 }
737 746
738 if (ofs + je32_to_cpu(node->totlen) > 747 if (ofs + je32_to_cpu(node->totlen) >
739 jeb->offset + c->sector_size) { 748 jeb->offset + c->sector_size) {