提交 2ea6357e 编写于 作者: C chenwei

Revert "fix: kernel crashed when delete a umounted folder"

Close: I3NGBT
Change-Id: I2a398c90edc0d543267f96d1c0dc19784639ab2d
上级 86209d5e
......@@ -243,9 +243,6 @@ int jffs2_rmdir (struct jffs2_inode *dir_i, struct jffs2_inode *d_inode, const u
int ret;
uint32_t now = Jffs2CurSec();
if (c == NULL) {
PRINT_ERR("%s-%d: sb_info null. sb=%p, inode=%p, vnode=%p\n", __FUNCTION__, __LINE__, dir_i->i_sb, dir_i, dir_i->i_vnode);
}
for (fd = f->dents ; fd; fd = fd->next) {
if (fd->ino) {
PRINT_ERR("%s-%d: ret=%d\n", __FUNCTION__, __LINE__, ENOTEMPTY);
......
......@@ -262,8 +262,6 @@ struct jffs2_inode *jffs2_iget(struct super_block *sb, uint32_t ino)
return inode;
}
extern int g_coveredVnodeTop;
extern struct Vnode *g_coveredVnodeList[100];
// -------------------------------------------------------------------------
// Decrement the reference count on an inode. If this makes the ref count
......@@ -277,13 +275,6 @@ 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]) {
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...
......@@ -354,7 +345,6 @@ 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.
先完成此消息的编辑!
想要评论请 注册