]> git.karo-electronics.de Git - linux-beck.git/blobdiff - fs/ext3/super.c
Merge branch 'drm-intel-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/ickle...
[linux-beck.git] / fs / ext3 / super.c
index 1c6875118b1e3e0557aa6cdf818d0a71dd3a2bb6..acf8695fa8f035935390dd6bc0c8e44e8d3e5961 100644 (file)
@@ -27,7 +27,6 @@
 #include <linux/init.h>
 #include <linux/blkdev.h>
 #include <linux/parser.h>
-#include <linux/smp_lock.h>
 #include <linux/buffer_head.h>
 #include <linux/exportfs.h>
 #include <linux/vfs.h>
@@ -411,9 +410,6 @@ static void ext3_put_super (struct super_block * sb)
        int i, err;
 
        dquot_disable(sb, -1, DQUOT_USAGE_ENABLED | DQUOT_LIMITS_ENABLED);
-
-       lock_kernel();
-
        ext3_xattr_put_super(sb);
        err = journal_destroy(sbi->s_journal);
        sbi->s_journal = NULL;
@@ -462,8 +458,6 @@ static void ext3_put_super (struct super_block * sb)
        sb->s_fs_info = NULL;
        kfree(sbi->s_blockgroup_lock);
        kfree(sbi);
-
-       unlock_kernel();
 }
 
 static struct kmem_cache *ext3_inode_cachep;
@@ -1627,8 +1621,6 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent)
        sbi->s_resgid = EXT3_DEF_RESGID;
        sbi->s_sb_block = sb_block;
 
-       unlock_kernel();
-
        blocksize = sb_min_blocksize(sb, EXT3_MIN_BLOCK_SIZE);
        if (!blocksize) {
                ext3_msg(sb, KERN_ERR, "error: unable to set blocksize");
@@ -1849,8 +1841,8 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent)
                goto failed_mount;
        }
 
-       if (le32_to_cpu(es->s_blocks_count) >
-                   (sector_t)(~0ULL) >> (sb->s_blocksize_bits - 9)) {
+       if (generic_check_addressable(sb->s_blocksize_bits,
+                                     le32_to_cpu(es->s_blocks_count))) {
                ext3_msg(sb, KERN_ERR,
                        "error: filesystem is too large to mount safely");
                if (sizeof(sector_t) < 8)
@@ -2026,7 +2018,6 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent)
                test_opt(sb,DATA_FLAGS) == EXT3_MOUNT_ORDERED_DATA ? "ordered":
                "writeback");
 
-       lock_kernel();
        return 0;
 
 cantfind_ext3:
@@ -2056,7 +2047,6 @@ out_fail:
        sb->s_fs_info = NULL;
        kfree(sbi->s_blockgroup_lock);
        kfree(sbi);
-       lock_kernel();
        return ret;
 }
 
@@ -2561,8 +2551,6 @@ static int ext3_remount (struct super_block * sb, int * flags, char * data)
        int i;
 #endif
 
-       lock_kernel();
-
        /* Store the original options */
        lock_super(sb);
        old_sb_flags = sb->s_flags;
@@ -2671,7 +2659,6 @@ static int ext3_remount (struct super_block * sb, int * flags, char * data)
                        kfree(old_opts.s_qf_names[i]);
 #endif
        unlock_super(sb);
-       unlock_kernel();
 
        if (enable_quota)
                dquot_resume(sb, -1);
@@ -2692,7 +2679,6 @@ restore_opts:
        }
 #endif
        unlock_super(sb);
-       unlock_kernel();
        return err;
 }
 
@@ -3033,16 +3019,16 @@ out:
 
 #endif
 
-static int ext3_get_sb(struct file_system_type *fs_type,
-       int flags, const char *dev_name, void *data, struct vfsmount *mnt)
+static struct dentry *ext3_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, ext3_fill_super, mnt);
+       return mount_bdev(fs_type, flags, dev_name, data, ext3_fill_super);
 }
 
 static struct file_system_type ext3_fs_type = {
        .owner          = THIS_MODULE,
        .name           = "ext3",
-       .get_sb         = ext3_get_sb,
+       .mount          = ext3_mount,
        .kill_sb        = kill_block_super,
        .fs_flags       = FS_REQUIRES_DEV,
 };