aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/nodelist.h
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2007-06-29 08:39:57 -0400
committerDavid Woodhouse <dwmw2@infradead.org>2007-08-02 16:39:50 -0400
commit71c23397752c0e40722d931ab9152342e9673336 (patch)
treeb6bc0e6b37b815c9f054b5184c8d1b8ec72208ce /fs/jffs2/nodelist.h
parent5bd5c03c317085339deb044ba52fce131a6a0b67 (diff)
[JFFS2] Deletion dirents should be REF_NORMAL, not REF_PRISTINE.
Otherwise they'll never actually get garbage-collected. Noted by Jonathan Larmour. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'fs/jffs2/nodelist.h')
-rw-r--r--fs/jffs2/nodelist.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/jffs2/nodelist.h b/fs/jffs2/nodelist.h
index 25126a062cae..bc5509fe577b 100644
--- a/fs/jffs2/nodelist.h
+++ b/fs/jffs2/nodelist.h
@@ -139,6 +139,11 @@ static inline struct jffs2_inode_cache *jffs2_raw_ref_to_ic(struct jffs2_raw_nod
139#define ref_obsolete(ref) (((ref)->flash_offset & 3) == REF_OBSOLETE) 139#define ref_obsolete(ref) (((ref)->flash_offset & 3) == REF_OBSOLETE)
140#define mark_ref_normal(ref) do { (ref)->flash_offset = ref_offset(ref) | REF_NORMAL; } while(0) 140#define mark_ref_normal(ref) do { (ref)->flash_offset = ref_offset(ref) | REF_NORMAL; } while(0)
141 141
142/* Dirent nodes should be REF_PRISTINE only if they are not a deletion
143 dirent. Deletion dirents should be REF_NORMAL so that GC gets to
144 throw them away when appropriate */
145#define dirent_node_state(rd) ( (je32_to_cpu((rd)->ino)?REF_PRISTINE:REF_NORMAL) )
146
142/* NB: REF_PRISTINE for an inode-less node (ref->next_in_ino == NULL) indicates 147/* NB: REF_PRISTINE for an inode-less node (ref->next_in_ino == NULL) indicates
143 it is an unknown node of type JFFS2_NODETYPE_RWCOMPAT_COPY, so it'll get 148 it is an unknown node of type JFFS2_NODETYPE_RWCOMPAT_COPY, so it'll get
144 copied. If you need to do anything different to GC inode-less nodes, then 149 copied. If you need to do anything different to GC inode-less nodes, then