[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>
这个提交包含在:
David Woodhouse
2007-06-29 13:39:57 +01:00
父节点 5bd5c03c31
当前提交 71c2339775
修改 4 个文件,包含 10 行新增3 行删除

查看文件

@@ -296,7 +296,8 @@ struct jffs2_full_dirent *jffs2_write_dirent(struct jffs2_sb_info *c, struct jff
return ERR_PTR(ret?ret:-EIO);
}
/* Mark the space used */
fd->raw = jffs2_add_physical_node_ref(c, flash_ofs | REF_PRISTINE, PAD(sizeof(*rd)+namelen), f->inocache);
fd->raw = jffs2_add_physical_node_ref(c, flash_ofs | dirent_node_state(rd),
PAD(sizeof(*rd)+namelen), f->inocache);
if (IS_ERR(fd->raw)) {
void *hold_err = fd->raw;
/* Release the full_dirent which is now useless, and return */