nilfs2: allow nilfs_destroy_inode to destroy metadata file inodes
[platform/kernel/linux-stable.git] / fs / nilfs2 / mdt.c
index 024be8c..ee943a3 100644 (file)
@@ -28,6 +28,7 @@
 #include <linux/swap.h>
 #include <linux/slab.h>
 #include "nilfs.h"
+#include "btnode.h"
 #include "segment.h"
 #include "page.h"
 #include "mdt.h"
@@ -576,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);
 }