Skip to contentSkip to conversation

yaffs2: Remove block number check from summary verification

PATCH In review Charles Manning 2 participants 2 messages Jan 20, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 yaffs2: Remove block number check from summary verification

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.

---
 fs/yaffs2/yaffs_summary.c |    1 -
 1 file changed, 1 deletion(-)
fs/yaffs2/yaffs_summary.c +0 -1
index 46e42f6..e9e1b5d 100644
@@ -232,7 +232,6 @@ int yaffs_summary_read(struct yaffs_dev *dev,
 	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;
Signature · 1 line
1.7.9.5
#1 lore raw
Quoted 7 lines · Charles Manning

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.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140120/a02bbbaa/attachment.pgp>