From 99988f7bbd16b861590dda4631c4db6cb17b5091 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Wed, 24 May 2006 09:04:17 +0100 Subject: [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 --- fs/jffs2/nodelist.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'fs/jffs2/nodelist.h') diff --git a/fs/jffs2/nodelist.h b/fs/jffs2/nodelist.h index 7cc74d2ab4d..94d152de95e 100644 --- a/fs/jffs2/nodelist.h +++ b/fs/jffs2/nodelist.h @@ -88,18 +88,18 @@ struct jffs2_raw_node_ref #endif }; +#define ref_next(r) ((r)->next_phys) + static inline struct jffs2_inode_cache *jffs2_raw_ref_to_ic(struct jffs2_raw_node_ref *raw) { - while(raw->next_in_ino) { + while(raw->next_in_ino) raw = raw->next_in_ino; - } /* NB. This can be a jffs2_xattr_datum or jffs2_xattr_ref and not actually a jffs2_inode_cache. Check ->class */ return ((struct jffs2_inode_cache *)raw); } - /* flash_offset & 3 always has to be zero, because nodes are always aligned at 4 bytes. So we have a couple of extra bits to play with, which indicate the node's status; see below: */ -- cgit v1.2.3