aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jffs2/write.c
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/write.c
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/write.c')
-rw-r--r--fs/jffs2/write.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/jffs2/write.c b/fs/jffs2/write.c
index 1406f2ce20a7..bc6185933664 100644
--- a/fs/jffs2/write.c
+++ b/fs/jffs2/write.c
@@ -296,7 +296,8 @@ struct jffs2_full_dirent *jffs2_write_dirent(struct jffs2_sb_info *c, struct jff
296 return ERR_PTR(ret?ret:-EIO); 296 return ERR_PTR(ret?ret:-EIO);
297 } 297 }
298 /* Mark the space used */ 298 /* Mark the space used */
299 fd->raw = jffs2_add_physical_node_ref(c, flash_ofs | REF_PRISTINE, PAD(sizeof(*rd)+namelen), f->inocache); 299 fd->raw = jffs2_add_physical_node_ref(c, flash_ofs | dirent_node_state(rd),
300 PAD(sizeof(*rd)+namelen), f->inocache);
300 if (IS_ERR(fd->raw)) { 301 if (IS_ERR(fd->raw)) {
301 void *hold_err = fd->raw; 302 void *hold_err = fd->raw;
302 /* Release the full_dirent which is now useless, and return */ 303 /* Release the full_dirent which is now useless, and return */