From: David Woodhouse Date: Tue, 30 May 2006 07:59:34 +0000 (+0100) Subject: [JFFS2] Fix calculation of potential summary marker offset on NOR flash. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=13ba42df4a385d7b77d7aac32b93bdcd73e6d6e1;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [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 --- 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 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);