diff options
author | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2010-08-20 23:46:06 +0900 |
---|---|---|
committer | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2010-10-23 09:24:33 +0900 |
commit | b91c9a97c9333c87fe2a0c94b3b22b24df1c5fc2 (patch) | |
tree | c407ef3a87117f9ecb92b54bebb055110cafb64f /fs/nilfs2/super.c | |
parent | 9566a7a851eb7201e3207eab53ee81efd0850fee (diff) | |
download | op-kernel-dev-b91c9a97c9333c87fe2a0c94b3b22b24df1c5fc2.zip op-kernel-dev-b91c9a97c9333c87fe2a0c94b3b22b24df1c5fc2.tar.gz |
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: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Diffstat (limited to 'fs/nilfs2/super.c')
-rw-r--r-- | fs/nilfs2/super.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c index 9f4913f..51576b4 100644 --- a/fs/nilfs2/super.c +++ b/fs/nilfs2/super.c @@ -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)); } |