aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hfs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/hfs/super.c')
-rw-r--r--fs/hfs/super.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/fs/hfs/super.c b/fs/hfs/super.c
index 34235d4bf08b..4824c27cebb8 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 */
80static void hfs_put_super(struct super_block *sb) 79static 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/*
@@ -385,8 +380,8 @@ static int hfs_fill_super(struct super_block *sb, void *data, int silent)
385 sbi = kzalloc(sizeof(struct hfs_sb_info), GFP_KERNEL); 380 sbi = kzalloc(sizeof(struct hfs_sb_info), GFP_KERNEL);
386 if (!sbi) 381 if (!sbi)
387 return -ENOMEM; 382 return -ENOMEM;
383
388 sb->s_fs_info = sbi; 384 sb->s_fs_info = sbi;
389 INIT_HLIST_HEAD(&sbi->rsrc_inodes);
390 385
391 res = -EINVAL; 386 res = -EINVAL;
392 if (!parse_options((char *)data, sbi)) { 387 if (!parse_options((char *)data, sbi)) {
@@ -446,17 +441,16 @@ bail:
446 return res; 441 return res;
447} 442}
448 443
449static int hfs_get_sb(struct file_system_type *fs_type, 444static struct dentry *hfs_mount(struct file_system_type *fs_type,
450 int flags, const char *dev_name, void *data, 445 int flags, const char *dev_name, void *data)
451 struct vfsmount *mnt)
452{ 446{
453 return get_sb_bdev(fs_type, flags, dev_name, data, hfs_fill_super, mnt); 447 return mount_bdev(fs_type, flags, dev_name, data, hfs_fill_super);
454} 448}
455 449
456static struct file_system_type hfs_fs_type = { 450static struct file_system_type hfs_fs_type = {
457 .owner = THIS_MODULE, 451 .owner = THIS_MODULE,
458 .name = "hfs", 452 .name = "hfs",
459 .get_sb = hfs_get_sb, 453 .mount = hfs_mount,
460 .kill_sb = kill_block_super, 454 .kill_sb = kill_block_super,
461 .fs_flags = FS_REQUIRES_DEV, 455 .fs_flags = FS_REQUIRES_DEV,
462}; 456};