Remove block number check from summary verification
authorCharles Manning <cdhmanning@gmail.com>
Mon, 20 Jan 2014 01:38:57 +0000 (14:38 +1300)
committerCharles Manning <cdhmanning@gmail.com>
Mon, 20 Jan 2014 01:38:57 +0000 (14:38 +1300)
The summary already has other verification. This one is not needed.

The check caused summaries to be ignored if they were not on the
numbered block. This caused problems when a summary was embedded in an
image and the image is written to a flash with bad blocks.

Signed-off-by: Charles Manning <cdhmanning@gmail.com>
yaffs_summary.c

index 6f3c7839fa6fb25556a9065bea3ccdfb1ea588b3..3c9e72321ea4ce6c4d03a545c34a0d6948cc8160 100644 (file)
@@ -235,7 +235,6 @@ int yaffs_summary_read(struct yaffs_dev *dev,
        if (result == YAFFS_OK) {
                /* Verify header */
                if (hdr.version != YAFFS_SUMMARY_VERSION ||
        if (result == YAFFS_OK) {
                /* Verify header */
                if (hdr.version != YAFFS_SUMMARY_VERSION ||
-                   hdr.block != blk ||
                    hdr.seq != bi->seq_number ||
                    hdr.sum != yaffs_summary_sum(dev))
                        result = YAFFS_FAIL;
                    hdr.seq != bi->seq_number ||
                    hdr.sum != yaffs_summary_sum(dev))
                        result = YAFFS_FAIL;