aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/scan.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2006-05-24 04:04:17 -0400
committerDavid Woodhouse <dwmw2@infradead.org>2006-05-24 04:04:17 -0400
commit99988f7bbd16b861590dda4631c4db6cb17b5091 (patch)
tree38865d44c905d7f84d7eeb70186482e1e399fe9c /fs/jffs2/scan.c
parent2f785402f39b96a077b6e62bf26164bfb8e0c980 (diff)
[JFFS2] Introduce ref_next() macro for finding next physical node
Another part of the preparation for switching to an array... Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'fs/jffs2/scan.c')
-rw-r--r--fs/jffs2/scan.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/jffs2/scan.c b/fs/jffs2/scan.c
index 87b0a416b6a0..3551c39d7472 100644
--- a/fs/jffs2/scan.c
+++ b/fs/jffs2/scan.c
@@ -295,7 +295,7 @@ int jffs2_fill_scan_buf (struct jffs2_sb_info *c, void *buf,
295int jffs2_scan_classify_jeb(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb) 295int jffs2_scan_classify_jeb(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb)
296{ 296{
297 if ((jeb->used_size + jeb->unchecked_size) == PAD(c->cleanmarker_size) && !jeb->dirty_size 297 if ((jeb->used_size + jeb->unchecked_size) == PAD(c->cleanmarker_size) && !jeb->dirty_size
298 && (!jeb->first_node || !jeb->first_node->next_phys) ) 298 && (!jeb->first_node || !ref_next(jeb->first_node)) )
299 return BLK_STATE_CLEANMARKER; 299 return BLK_STATE_CLEANMARKER;
300 300
301 /* move blocks with max 4 byte dirty space to cleanlist */ 301 /* move blocks with max 4 byte dirty space to cleanlist */
@@ -647,7 +647,7 @@ scan_more:
647 /* If we're only checking the beginning of a block with a cleanmarker, 647 /* If we're only checking the beginning of a block with a cleanmarker,
648 bail now */ 648 bail now */
649 if (buf_ofs == jeb->offset && jeb->used_size == PAD(c->cleanmarker_size) && 649 if (buf_ofs == jeb->offset && jeb->used_size == PAD(c->cleanmarker_size) &&
650 c->cleanmarker_size && !jeb->dirty_size && !jeb->first_node->next_phys) { 650 c->cleanmarker_size && !jeb->dirty_size && !ref_next(jeb->first_node)) {
651 D1(printk(KERN_DEBUG "%d bytes at start of block seems clean... assuming all clean\n", EMPTY_SCAN_SIZE(c->sector_size))); 651 D1(printk(KERN_DEBUG "%d bytes at start of block seems clean... assuming all clean\n", EMPTY_SCAN_SIZE(c->sector_size)));
652 return BLK_STATE_CLEANMARKER; 652 return BLK_STATE_CLEANMARKER;
653 } 653 }