summaryrefslogtreecommitdiff
path: root/fs/jffs2/scan.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2006-05-24 09:04:17 +0100
committerDavid Woodhouse <dwmw2@infradead.org>2006-05-24 09:04:17 +0100
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,
int jffs2_scan_classify_jeb(struct jffs2_sb_info *c, struct jffs2_eraseblock *jeb)
{
if ((jeb->used_size + jeb->unchecked_size) == PAD(c->cleanmarker_size) && !jeb->dirty_size
- && (!jeb->first_node || !jeb->first_node->next_phys) )
+ && (!jeb->first_node || !ref_next(jeb->first_node)) )
return BLK_STATE_CLEANMARKER;
/* move blocks with max 4 byte dirty space to cleanlist */
@@ -647,7 +647,7 @@ scan_more:
/* If we're only checking the beginning of a block with a cleanmarker,
bail now */
if (buf_ofs == jeb->offset && jeb->used_size == PAD(c->cleanmarker_size) &&
- c->cleanmarker_size && !jeb->dirty_size && !jeb->first_node->next_phys) {
+ c->cleanmarker_size && !jeb->dirty_size && !ref_next(jeb->first_node)) {
D1(printk(KERN_DEBUG "%d bytes at start of block seems clean... assuming all clean\n", EMPTY_SCAN_SIZE(c->sector_size)));
return BLK_STATE_CLEANMARKER;
}