diff options
Diffstat (limited to 'fs/hfs/mdb.c')
-rw-r--r-- | fs/hfs/mdb.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/hfs/mdb.c b/fs/hfs/mdb.c index 4efb640c4d0c..217e32f37e0b 100644 --- a/fs/hfs/mdb.c +++ b/fs/hfs/mdb.c | |||
@@ -333,6 +333,8 @@ void hfs_mdb_close(struct super_block *sb) | |||
333 | * Release the resources associated with the in-core MDB. */ | 333 | * Release the resources associated with the in-core MDB. */ |
334 | void hfs_mdb_put(struct super_block *sb) | 334 | void hfs_mdb_put(struct super_block *sb) |
335 | { | 335 | { |
336 | if (!HFS_SB(sb)) | ||
337 | return; | ||
336 | /* free the B-trees */ | 338 | /* free the B-trees */ |
337 | hfs_btree_close(HFS_SB(sb)->ext_tree); | 339 | hfs_btree_close(HFS_SB(sb)->ext_tree); |
338 | hfs_btree_close(HFS_SB(sb)->cat_tree); | 340 | hfs_btree_close(HFS_SB(sb)->cat_tree); |
@@ -340,4 +342,7 @@ void hfs_mdb_put(struct super_block *sb) | |||
340 | /* free the buffers holding the primary and alternate MDBs */ | 342 | /* free the buffers holding the primary and alternate MDBs */ |
341 | brelse(HFS_SB(sb)->mdb_bh); | 343 | brelse(HFS_SB(sb)->mdb_bh); |
342 | brelse(HFS_SB(sb)->alt_mdb_bh); | 344 | brelse(HFS_SB(sb)->alt_mdb_bh); |
345 | |||
346 | kfree(HFS_SB(sb)); | ||
347 | sb->s_fs_info = NULL; | ||
343 | } | 348 | } |