]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - fs/fat/namei_msdos.c
Merge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspe...
[net-next-2.6.git] / fs / fat / namei_msdos.c
index bbc94ae4fd77150203435058b79e46a03bfb40bc..3345aabd1dd7e32585b18956175265ec3fdda011 100644 (file)
@@ -662,27 +662,30 @@ static int msdos_fill_super(struct super_block *sb, void *data, int silent)
 {
        int res;
 
+       lock_super(sb);
        res = fat_fill_super(sb, data, silent, &msdos_dir_inode_operations, 0);
-       if (res)
+       if (res) {
+               unlock_super(sb);
                return res;
+       }
 
        sb->s_flags |= MS_NOATIME;
        sb->s_root->d_op = &msdos_dentry_operations;
+       unlock_super(sb);
        return 0;
 }
 
-static int msdos_get_sb(struct file_system_type *fs_type,
+static struct dentry *msdos_mount(struct file_system_type *fs_type,
                        int flags, const char *dev_name,
-                       void *data, struct vfsmount *mnt)
+                       void *data)
 {
-       return get_sb_bdev(fs_type, flags, dev_name, data, msdos_fill_super,
-                          mnt);
+       return mount_bdev(fs_type, flags, dev_name, data, msdos_fill_super);
 }
 
 static struct file_system_type msdos_fs_type = {
        .owner          = THIS_MODULE,
        .name           = "msdos",
-       .get_sb         = msdos_get_sb,
+       .mount          = msdos_mount,
        .kill_sb        = kill_block_super,
        .fs_flags       = FS_REQUIRES_DEV,
 };