]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - fs/hpfs/super.c
hpfs: Convert sbi->hpfs_creation_de to mutex
[net-next-2.6.git] / fs / hpfs / super.c
index aa53842c599c2eec917086af4d2c8b1d2fea1384..18e1d4566ecfe5df8b1f074fd9d2129ad173d3ee 100644 (file)
@@ -450,7 +450,7 @@ static const struct super_operations hpfs_sops =
 {
        .alloc_inode    = hpfs_alloc_inode,
        .destroy_inode  = hpfs_destroy_inode,
-       .delete_inode   = hpfs_delete_inode,
+       .evict_inode    = hpfs_evict_inode,
        .put_super      = hpfs_put_super,
        .statfs         = hpfs_statfs,
        .remount_fs     = hpfs_remount_fs,
@@ -477,17 +477,21 @@ static int hpfs_fill_super(struct super_block *s, void *options, int silent)
 
        int o;
 
+       lock_kernel();
+
        save_mount_options(s, options);
 
        sbi = kzalloc(sizeof(*sbi), GFP_KERNEL);
-       if (!sbi)
+       if (!sbi) {
+               unlock_kernel();
                return -ENOMEM;
+       }
        s->s_fs_info = sbi;
 
        sbi->sb_bmp_dir = NULL;
        sbi->sb_cp_table = NULL;
 
-       init_MUTEX(&sbi->hpfs_creation_de);
+       mutex_init(&sbi->hpfs_creation_de);
 
        uid = current_uid();
        gid = current_gid();
@@ -666,6 +670,7 @@ static int hpfs_fill_super(struct super_block *s, void *options, int silent)
                        root->i_blocks = 5;
                hpfs_brelse4(&qbh);
        }
+       unlock_kernel();
        return 0;
 
 bail4: brelse(bh2);
@@ -677,6 +682,7 @@ bail0:
        kfree(sbi->sb_cp_table);
        s->s_fs_info = NULL;
        kfree(sbi);
+       unlock_kernel();
        return -EINVAL;
 }