diff --git a/fs/jffs2/dir.c b/fs/jffs2/dir.c index 80069e34325dda0f7c9ca9ee61b5debef79b8d78..6648a6ae5231e2c3bec72d5d2f39d528e7794221 100644 --- a/fs/jffs2/dir.c +++ b/fs/jffs2/dir.c @@ -243,6 +243,9 @@ 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); diff --git a/fs/jffs2/fs.c b/fs/jffs2/fs.c index d25e6f87352a58026c3e1938310a2687972fcdc8..d740d8c87f273be69199b5921426389b0ebf0b57 100644 --- a/fs/jffs2/fs.c +++ b/fs/jffs2/fs.c @@ -262,6 +262,8 @@ 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 @@ -275,6 +277,12 @@ 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); + } + } + Jffs2NodeLock(); if (!i || i->i_nlink) { // and let it fault...