Push lock_super() into the ->remount_fs() of filesystems that care about it
[firefly-linux-kernel-4.4.55.git] / fs / ext4 / super.c
index 1d4180b867729a9b80db1edb85001ee243846fd8..a9c683425929378f827443b349d3246d79834c1f 100644 (file)
@@ -3421,6 +3421,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
 #endif
 
        /* Store the original options */
+       lock_super(sb);
        old_sb_flags = sb->s_flags;
        old_opts.s_mount_opt = sbi->s_mount_opt;
        old_opts.s_resuid = sbi->s_resuid;
@@ -3554,6 +3555,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
                    old_opts.s_qf_names[i] != sbi->s_qf_names[i])
                        kfree(old_opts.s_qf_names[i]);
 #endif
+       unlock_super(sb);
        return 0;
 
 restore_opts:
@@ -3573,6 +3575,7 @@ restore_opts:
                sbi->s_qf_names[i] = old_opts.s_qf_names[i];
        }
 #endif
+       unlock_super(sb);
        return err;
 }