diff options
| -rw-r--r-- | fs/hfs/super.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/fs/hfs/super.c b/fs/hfs/super.c index 3069416fa8ef..33254160f650 100644 --- a/fs/hfs/super.c +++ b/fs/hfs/super.c | |||
| @@ -20,7 +20,6 @@ | |||
| 20 | #include <linux/parser.h> | 20 | #include <linux/parser.h> |
| 21 | #include <linux/seq_file.h> | 21 | #include <linux/seq_file.h> |
| 22 | #include <linux/slab.h> | 22 | #include <linux/slab.h> |
| 23 | #include <linux/smp_lock.h> | ||
| 24 | #include <linux/vfs.h> | 23 | #include <linux/vfs.h> |
| 25 | 24 | ||
| 26 | #include "hfs_fs.h" | 25 | #include "hfs_fs.h" |
| @@ -79,15 +78,11 @@ static int hfs_sync_fs(struct super_block *sb, int wait) | |||
| 79 | */ | 78 | */ |
| 80 | static void hfs_put_super(struct super_block *sb) | 79 | static void hfs_put_super(struct super_block *sb) |
| 81 | { | 80 | { |
| 82 | lock_kernel(); | ||
| 83 | |||
| 84 | if (sb->s_dirt) | 81 | if (sb->s_dirt) |
| 85 | hfs_write_super(sb); | 82 | hfs_write_super(sb); |
| 86 | hfs_mdb_close(sb); | 83 | hfs_mdb_close(sb); |
| 87 | /* release the MDB's resources */ | 84 | /* release the MDB's resources */ |
| 88 | hfs_mdb_put(sb); | 85 | hfs_mdb_put(sb); |
| 89 | |||
| 90 | unlock_kernel(); | ||
| 91 | } | 86 | } |
| 92 | 87 | ||
| 93 | /* | 88 | /* |
| @@ -382,13 +377,10 @@ static int hfs_fill_super(struct super_block *sb, void *data, int silent) | |||
| 382 | struct inode *root_inode; | 377 | struct inode *root_inode; |
| 383 | int res; | 378 | int res; |
| 384 | 379 | ||
| 385 | lock_kernel(); | ||
| 386 | |||
| 387 | sbi = kzalloc(sizeof(struct hfs_sb_info), GFP_KERNEL); | 380 | sbi = kzalloc(sizeof(struct hfs_sb_info), GFP_KERNEL); |
| 388 | if (!sbi) { | 381 | if (!sbi) |
| 389 | unlock_kernel(); | ||
| 390 | return -ENOMEM; | 382 | return -ENOMEM; |
| 391 | } | 383 | |
| 392 | sb->s_fs_info = sbi; | 384 | sb->s_fs_info = sbi; |
| 393 | INIT_HLIST_HEAD(&sbi->rsrc_inodes); | 385 | INIT_HLIST_HEAD(&sbi->rsrc_inodes); |
| 394 | 386 | ||
| @@ -439,7 +431,6 @@ static int hfs_fill_super(struct super_block *sb, void *data, int silent) | |||
| 439 | sb->s_root->d_op = &hfs_dentry_operations; | 431 | sb->s_root->d_op = &hfs_dentry_operations; |
| 440 | 432 | ||
| 441 | /* everything's okay */ | 433 | /* everything's okay */ |
| 442 | unlock_kernel(); | ||
| 443 | return 0; | 434 | return 0; |
| 444 | 435 | ||
| 445 | bail_iput: | 436 | bail_iput: |
| @@ -448,7 +439,6 @@ bail_no_root: | |||
| 448 | printk(KERN_ERR "hfs: get root inode failed.\n"); | 439 | printk(KERN_ERR "hfs: get root inode failed.\n"); |
| 449 | bail: | 440 | bail: |
| 450 | hfs_mdb_put(sb); | 441 | hfs_mdb_put(sb); |
| 451 | unlock_kernel(); | ||
| 452 | return res; | 442 | return res; |
| 453 | } | 443 | } |
| 454 | 444 | ||
