nilfs2: fix timing issue between rmcp and chcp ioctls
[cascardo/linux.git] / fs / sysfs / mount.c
index 52c3bdb..71eb7e2 100644 (file)
@@ -68,6 +68,7 @@ static int sysfs_fill_super(struct super_block *sb, void *data, int silent)
        }
        root->d_fsdata = &sysfs_root;
        sb->s_root = root;
+       sb->s_d_op = &sysfs_dentry_ops;
        return 0;
 }
 
@@ -117,13 +118,12 @@ static struct dentry *sysfs_mount(struct file_system_type *fs_type,
        for (type = KOBJ_NS_TYPE_NONE; type < KOBJ_NS_TYPES; type++)
                info->ns[type] = kobj_ns_grab_current(type);
 
-       sb = sget(fs_type, sysfs_test_super, sysfs_set_super, info);
+       sb = sget(fs_type, sysfs_test_super, sysfs_set_super, flags, info);
        if (IS_ERR(sb) || sb->s_fs_info != info)
                free_sysfs_super_info(info);
        if (IS_ERR(sb))
                return ERR_CAST(sb);
        if (!sb->s_root) {
-               sb->s_flags = flags;
                error = sysfs_fill_super(sb, data, flags & MS_SILENT ? 1 : 0);
                if (error) {
                        deactivate_locked_super(sb);