projects
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
nilfs2: allow nilfs_destroy_inode to destroy metadata file inodes
[linux.git]
/
fs
/
nilfs2
/
super.c
diff --git
a/fs/nilfs2/super.c
b/fs/nilfs2/super.c
index 9f4913f78408a80e5c9b1253c19ac092adecb2b2..51576b4dbf7a0b51b6d12a52f8c93a0cb20e16c7 100644
(file)
--- 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));
}