]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - fs/adfs/super.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
[net-next-2.6.git] / fs / adfs / super.c
index 4a3af7075c1d09058347ef532edc8c3105a9f9d5..959dbff2d42dc4a0a0026e3b3aad5f7f0008a7f3 100644 (file)
@@ -352,11 +352,15 @@ static int adfs_fill_super(struct super_block *sb, void *data, int silent)
        struct adfs_sb_info *asb;
        struct inode *root;
 
+       lock_kernel();
+
        sb->s_flags |= MS_NODIRATIME;
 
        asb = kzalloc(sizeof(*asb), GFP_KERNEL);
-       if (!asb)
+       if (!asb) {
+               unlock_kernel();
                return -ENOMEM;
+       }
        sb->s_fs_info = asb;
 
        /* set default options */
@@ -474,6 +478,7 @@ static int adfs_fill_super(struct super_block *sb, void *data, int silent)
                goto error;
        } else
                sb->s_root->d_op = &adfs_dentry_operations;
+       unlock_kernel();
        return 0;
 
 error_free_bh:
@@ -481,20 +486,20 @@ error_free_bh:
 error:
        sb->s_fs_info = NULL;
        kfree(asb);
+       unlock_kernel();
        return -EINVAL;
 }
 
-static int adfs_get_sb(struct file_system_type *fs_type,
-       int flags, const char *dev_name, void *data, struct vfsmount *mnt)
+static struct dentry *adfs_mount(struct file_system_type *fs_type,
+       int flags, const char *dev_name, void *data)
 {
-       return get_sb_bdev(fs_type, flags, dev_name, data, adfs_fill_super,
-                          mnt);
+       return mount_bdev(fs_type, flags, dev_name, data, adfs_fill_super);
 }
 
 static struct file_system_type adfs_fs_type = {
        .owner          = THIS_MODULE,
        .name           = "adfs",
-       .get_sb         = adfs_get_sb,
+       .mount          = adfs_mount,
        .kill_sb        = kill_block_super,
        .fs_flags       = FS_REQUIRES_DEV,
 };