aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hpfs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/hpfs/super.c')
-rw-r--r--fs/hpfs/super.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/hpfs/super.c b/fs/hpfs/super.c
index 501ea86e40a4..41232c2d60dc 100644
--- a/fs/hpfs/super.c
+++ b/fs/hpfs/super.c
@@ -102,9 +102,12 @@ static void hpfs_put_super(struct super_block *s)
102{ 102{
103 struct hpfs_sb_info *sbi = hpfs_sb(s); 103 struct hpfs_sb_info *sbi = hpfs_sb(s);
104 104
105 hpfs_lock(s);
106 unmark_dirty(s);
107 hpfs_unlock(s);
108
105 kfree(sbi->sb_cp_table); 109 kfree(sbi->sb_cp_table);
106 kfree(sbi->sb_bmp_dir); 110 kfree(sbi->sb_bmp_dir);
107 unmark_dirty(s);
108 s->s_fs_info = NULL; 111 s->s_fs_info = NULL;
109 kfree(sbi); 112 kfree(sbi);
110} 113}
@@ -490,6 +493,9 @@ static int hpfs_fill_super(struct super_block *s, void *options, int silent)
490 sbi->sb_bmp_dir = NULL; 493 sbi->sb_bmp_dir = NULL;
491 sbi->sb_cp_table = NULL; 494 sbi->sb_cp_table = NULL;
492 495
496 mutex_init(&sbi->hpfs_mutex);
497 hpfs_lock(s);
498
493 mutex_init(&sbi->hpfs_creation_de); 499 mutex_init(&sbi->hpfs_creation_de);
494 500
495 uid = current_uid(); 501 uid = current_uid();
@@ -669,6 +675,7 @@ static int hpfs_fill_super(struct super_block *s, void *options, int silent)
669 root->i_blocks = 5; 675 root->i_blocks = 5;
670 hpfs_brelse4(&qbh); 676 hpfs_brelse4(&qbh);
671 } 677 }
678 hpfs_unlock(s);
672 return 0; 679 return 0;
673 680
674bail4: brelse(bh2); 681bail4: brelse(bh2);
@@ -676,6 +683,7 @@ bail3: brelse(bh1);
676bail2: brelse(bh0); 683bail2: brelse(bh0);
677bail1: 684bail1:
678bail0: 685bail0:
686 hpfs_unlock(s);
679 kfree(sbi->sb_bmp_dir); 687 kfree(sbi->sb_bmp_dir);
680 kfree(sbi->sb_cp_table); 688 kfree(sbi->sb_cp_table);
681 s->s_fs_info = NULL; 689 s->s_fs_info = NULL;