diff --git a/[refs] b/[refs] index 1bb69c146c58..6cf7d31e5110 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9566a7a851eb7201e3207eab53ee81efd0850fee +refs/heads/master: b91c9a97c9333c87fe2a0c94b3b22b24df1c5fc2 diff --git a/trunk/fs/nilfs2/mdt.c b/trunk/fs/nilfs2/mdt.c index d01aff4957d9..ee943a342e1d 100644 --- a/trunk/fs/nilfs2/mdt.c +++ b/trunk/fs/nilfs2/mdt.c @@ -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); } diff --git a/trunk/fs/nilfs2/super.c b/trunk/fs/nilfs2/super.c index 9f4913f78408..51576b4dbf7a 100644 --- a/trunk/fs/nilfs2/super.c +++ b/trunk/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)); }