Merge tag 'smp-core-2021-08-30' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-microblaze.git] / drivers / md / raid5.c
index b8436e4..02ed53b 100644 (file)
@@ -2437,7 +2437,7 @@ static int resize_chunks(struct r5conf *conf, int new_disks, int new_sectors)
            conf->scribble_sectors >= new_sectors)
                return 0;
        mddev_suspend(conf->mddev);
-       get_online_cpus();
+       cpus_read_lock();
 
        for_each_present_cpu(cpu) {
                struct raid5_percpu *percpu;
@@ -2449,7 +2449,7 @@ static int resize_chunks(struct r5conf *conf, int new_disks, int new_sectors)
                        break;
        }
 
-       put_online_cpus();
+       cpus_read_unlock();
        mddev_resume(conf->mddev);
        if (!err) {
                conf->scribble_disks = new_disks;