Merge tag 'vfs-5.7-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
[linux-block.git] / kernel / torture.c
index 8683375dc0c7488ef59da4d3413cb64f060c8088..a1a41484ff6d6688bef6def0974d9df9d020b278 100644 (file)
@@ -101,7 +101,7 @@ bool torture_offline(int cpu, long *n_offl_attempts, long *n_offl_successes,
                         torture_type, cpu);
        starttime = jiffies;
        (*n_offl_attempts)++;
-       ret = cpu_down(cpu);
+       ret = remove_cpu(cpu);
        if (ret) {
                s = "";
                if (!rcu_inkernel_boot_has_ended() && ret == -EBUSY) {
@@ -159,7 +159,7 @@ bool torture_online(int cpu, long *n_onl_attempts, long *n_onl_successes,
                         torture_type, cpu);
        starttime = jiffies;
        (*n_onl_attempts)++;
-       ret = cpu_up(cpu);
+       ret = add_cpu(cpu);
        if (ret) {
                s = "";
                if (!rcu_inkernel_boot_has_ended() && ret == -EBUSY) {
@@ -209,17 +209,18 @@ torture_onoff(void *arg)
        for_each_online_cpu(cpu)
                maxcpu = cpu;
        WARN_ON(maxcpu < 0);
-       if (!IS_MODULE(CONFIG_TORTURE_TEST))
+       if (!IS_MODULE(CONFIG_TORTURE_TEST)) {
                for_each_possible_cpu(cpu) {
                        if (cpu_online(cpu))
                                continue;
-                       ret = cpu_up(cpu);
+                       ret = add_cpu(cpu);
                        if (ret && verbose) {
                                pr_alert("%s" TORTURE_FLAG
                                         "%s: Initial online %d: errno %d\n",
                                         __func__, torture_type, cpu, ret);
                        }
                }
+       }
 
        if (maxcpu == 0) {
                VERBOSE_TOROUT_STRING("Only one CPU, so CPU-hotplug testing is disabled");