Skip to content

Commit 252034e

Browse files
Sebastian Andrzej SiewiorKAGA-KOKO
authored andcommitted
md/raid5: Replace deprecated CPU-hotplug functions.
The functions get_online_cpus() and put_online_cpus() have been deprecated during the CPU hotplug rework. They map directly to cpus_read_lock() and cpus_read_unlock(). Replace deprecated CPU-hotplug functions with the official version. The behavior remains unchanged. Signed-off-by: Sebastian Andrzej Siewior <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Acked-by: Song Liu <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent c7483d8 commit 252034e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/md/raid5.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2437,7 +2437,7 @@ static int resize_chunks(struct r5conf *conf, int new_disks, int new_sectors)
24372437
conf->scribble_sectors >= new_sectors)
24382438
return 0;
24392439
mddev_suspend(conf->mddev);
2440-
get_online_cpus();
2440+
cpus_read_lock();
24412441

24422442
for_each_present_cpu(cpu) {
24432443
struct raid5_percpu *percpu;
@@ -2449,7 +2449,7 @@ static int resize_chunks(struct r5conf *conf, int new_disks, int new_sectors)
24492449
break;
24502450
}
24512451

2452-
put_online_cpus();
2452+
cpus_read_unlock();
24532453
mddev_resume(conf->mddev);
24542454
if (!err) {
24552455
conf->scribble_disks = new_disks;

0 commit comments

Comments
 (0)