Skip to content

Commit

Permalink
[JFFS2] Fix calculation of potential summary marker offset on NOR flash.
Browse files Browse the repository at this point in the history
Helps if we look _inside_ the buffer, rather than adding jeb->offset to
it. Doh.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
  • Loading branch information
David Woodhouse committed May 30, 2006
1 parent f1a28c0 commit 13ba42d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/jffs2/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ static int jffs2_scan_eraseblock (struct jffs2_sb_info *c, struct jffs2_eraseblo

if (!buf_size) {
/* XIP case. Just look, point at the summary if it's there */
sm = (void *)buf + jeb->offset - sizeof(*sm);
sm = (void *)buf + c->sector_size - sizeof(*sm);
if (je32_to_cpu(sm->magic) == JFFS2_SUM_MAGIC) {
sumptr = buf + je32_to_cpu(sm->offset);
sumlen = c->sector_size - je32_to_cpu(sm->offset);
Expand Down

0 comments on commit 13ba42d

Please sign in to comment.