]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/ufs/super.c
Merge branch 'for-linus' of git://git.infradead.org/users/eparis/notify
[karo-tx-linux.git] / fs / ufs / super.c
index d510c1b91817c9543ea5da4f062af0cc7eb3ae4f..2c47daed56dac7f2ad789a41a2d1e19fc929a49b 100644 (file)
@@ -696,6 +696,8 @@ static int ufs_fill_super(struct super_block *sb, void *data, int silent)
        unsigned maxsymlen;
        int ret = -EINVAL;
 
+       lock_kernel();
+
        uspi = NULL;
        ubh = NULL;
        flags = 0;
@@ -1163,6 +1165,7 @@ magic_found:
                        goto failed;
 
        UFSD("EXIT\n");
+       unlock_kernel();
        return 0;
 
 dalloc_failed:
@@ -1174,10 +1177,12 @@ failed:
        kfree(sbi);
        sb->s_fs_info = NULL;
        UFSD("EXIT (FAILED)\n");
+       unlock_kernel();
        return ret;
 
 failed_nomem:
        UFSD("EXIT (NOMEM)\n");
+       unlock_kernel();
        return -ENOMEM;
 }
 
@@ -1449,16 +1454,16 @@ static const struct super_operations ufs_super_ops = {
        .show_options   = ufs_show_options,
 };
 
-static int ufs_get_sb(struct file_system_type *fs_type,
-       int flags, const char *dev_name, void *data, struct vfsmount *mnt)
+static struct dentry *ufs_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, ufs_fill_super, mnt);
+       return mount_bdev(fs_type, flags, dev_name, data, ufs_fill_super);
 }
 
 static struct file_system_type ufs_fs_type = {
        .owner          = THIS_MODULE,
        .name           = "ufs",
-       .get_sb         = ufs_get_sb,
+       .mount          = ufs_mount,
        .kill_sb        = kill_block_super,
        .fs_flags       = FS_REQUIRES_DEV,
 };