1 diff -ur linux.old/fs/jffs2/scan.c linux.dev/fs/jffs2/scan.c
2 --- linux.old/fs/jffs2/scan.c 2006-05-31 02:31:44.000000000 +0200
3 +++ linux.dev/fs/jffs2/scan.c 2006-06-15 02:20:32.000000000 +0200
5 /* reset summary info for next eraseblock scan */
6 jffs2_sum_reset_collected(s);
8 - ret = jffs2_scan_eraseblock(c, jeb, buf_size?flashbuf:(flashbuf+jeb->offset),
10 + if (c->flags & (1 << 7))
11 + ret = BLK_STATE_ALLFF;
13 + ret = jffs2_scan_eraseblock(c, jeb, buf_size?flashbuf:(flashbuf+jeb->offset),
22 + if (c->flags & (1 << 7)) {
23 + printk("jffs2_scan_medium(): erasing all blocks after the end marker...\n");
24 + jffs2_erase_pending_blocks(c, -1);
25 + printk("jffs2_scan_medium(): done.\n");
28 if (jffs2_sum_active() && s)
35 + if ((buf[0] == 0xde) &&
39 + /* end of filesystem. erase everything after this point */
40 + printk("jffs2_scan_eraseblock(): End of filesystem marker found at 0x%x\n", jeb->offset);
41 + c->flags |= (1 << 7);
43 + return BLK_STATE_ALLFF;
46 /* We temporarily use 'ofs' as a pointer into the buffer/jeb */