aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2006-05-30 03:59:34 -0400
committerDavid Woodhouse <dwmw2@infradead.org>2006-05-30 03:59:34 -0400
commit13ba42df4a385d7b77d7aac32b93bdcd73e6d6e1 (patch)
tree55aedef4dfd7d29aaf46fe8983f95a7966a00bc4 /fs/jffs2
parentf1a28c02843efcfcc41982149880bac3ac180234 (diff)
[JFFS2] Fix calculation of potential summary marker offset on NOR flash.
Helps if we look _inside_ the buffer, rather than adding jeb->offset to it. Doh. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'fs/jffs2')
-rw-r--r--fs/jffs2/scan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/jffs2/scan.c b/fs/jffs2/scan.c
index 42c1ff21d352..61618080b86f 100644
--- a/fs/jffs2/scan.c
+++ b/fs/jffs2/scan.c
@@ -463,7 +463,7 @@ static int jffs2_scan_eraseblock (struct jffs2_sb_info *c, struct jffs2_eraseblo
463 463
464 if (!buf_size) { 464 if (!buf_size) {
465 /* XIP case. Just look, point at the summary if it's there */ 465 /* XIP case. Just look, point at the summary if it's there */
466 sm = (void *)buf + jeb->offset - sizeof(*sm); 466 sm = (void *)buf + c->sector_size - sizeof(*sm);
467 if (je32_to_cpu(sm->magic) == JFFS2_SUM_MAGIC) { 467 if (je32_to_cpu(sm->magic) == JFFS2_SUM_MAGIC) {
468 sumptr = buf + je32_to_cpu(sm->offset); 468 sumptr = buf + je32_to_cpu(sm->offset);
469 sumlen = c->sector_size - je32_to_cpu(sm->offset); 469 sumlen = c->sector_size - je32_to_cpu(sm->offset);