Commit b91c9a97 authored by Ryusuke Konishi's avatar Ryusuke Konishi

nilfs2: allow nilfs_destroy_inode to destroy metadata file inodes

The current nilfs_destroy_inode() doesn't handle metadata file inodes
including gc inodes (dummy inodes used for garbage collection).

This allows nilfs_destroy_inode() to destroy inodes of metadata files.
Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
parent 9566a7a8
......@@ -577,7 +577,5 @@ void nilfs_mdt_destroy(struct inode *inode)
nilfs_palloc_destroy_cache(inode);
nilfs_mdt_clear(inode);
kfree(mdi->mi_bgl); /* kfree(NULL) is safe */
kfree(mdi);
nilfs_destroy_inode(inode);
}
......@@ -167,6 +167,12 @@ struct inode *nilfs_alloc_inode(struct super_block *sb)
void nilfs_destroy_inode(struct inode *inode)
{
struct nilfs_mdt_info *mdi = NILFS_MDT(inode);
if (mdi) {
kfree(mdi->mi_bgl); /* kfree(NULL) is safe */
kfree(mdi);
}
kmem_cache_free(nilfs_inode_cachep, NILFS_I(inode));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment