提交 b8f87864 编写于 作者: C chenwei

fix: kernel crashed when delete a umounted folder

Close: I3MZZ6
Change-Id: I16f781c541d9c7c1aaf031c87ec0835a6f546df7
上级 0f8d5789
......@@ -277,12 +277,13 @@ int jffs2_iput(struct jffs2_inode *i)
// and gc.c jffs2_garbage_collect_pass
struct jffs2_inode_info *f = NULL;
for (int p = 0; p < g_coveredVnodeTop; p++) {
if (i->i_vnode == g_coveredVnodeList[p]) {
PRINT_ERR("%s-%d: jffs2_iput mounted vnode. vnode=%p, inode=%p, i->i_nlink=%d\n", __FUNCTION__, __LINE__, i->i_vnode, i, i->i_nlink);
}
}
for (int p = 0; p < g_coveredVnodeTop; p++) {
if (i->i_vnode == g_coveredVnodeList[p]) {
PRINTK("%s-%d: jffs2_iput mounted vnode. vnode=%p, inode=%p, i->i_nlink=%d\n", __FUNCTION__, __LINE__, i->i_vnode, i, i->i_nlink);
}
}
PRINTK("%s-%d: jffs2_iput vnode. vnode=%p, inode=%p, i->i_nlink=%d\n", __FUNCTION__, __LINE__, i->i_vnode, i, i->i_nlink);
Jffs2NodeLock();
if (!i || i->i_nlink) {
// and let it fault...
......@@ -353,6 +354,7 @@ struct jffs2_inode *jffs2_new_inode (struct jffs2_inode *dir_i, int mode, struct
(void)Jffs2HashInsert(&sb->s_node_hash_lock, &sb->s_node_hash[0], inode, inode->i_ino);
Jffs2NodeUnlock();
PRINTK("%s-%d: inode=%p, i_nlink=%d\n", __FUNCTION__, __LINE__, inode, inode->i_nlink);
return inode;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册