]> err.no Git - linux-2.6/blobdiff - fs/hfs/mdb.c
[PATCH] blk: Use blk_queue_xxx functions to set parameters
[linux-2.6] / fs / hfs / mdb.c
index 4efb640c4d0cc838938a1d1c202c3eb47d44ecc8..217e32f37e0be7bce323a9962c0cf95adb394b9e 100644 (file)
@@ -333,6 +333,8 @@ void hfs_mdb_close(struct super_block *sb)
  * Release the resources associated with the in-core MDB.  */
 void hfs_mdb_put(struct super_block *sb)
 {
+       if (!HFS_SB(sb))
+               return;
        /* free the B-trees */
        hfs_btree_close(HFS_SB(sb)->ext_tree);
        hfs_btree_close(HFS_SB(sb)->cat_tree);
@@ -340,4 +342,7 @@ void hfs_mdb_put(struct super_block *sb)
        /* free the buffers holding the primary and alternate MDBs */
        brelse(HFS_SB(sb)->mdb_bh);
        brelse(HFS_SB(sb)->alt_mdb_bh);
+
+       kfree(HFS_SB(sb));
+       sb->s_fs_info = NULL;
 }