Skip to content

Commit 1978c74

Browse files
YuKuai-huaweiliu-song-6
authored andcommitted
md/md-linear: cleanup linear_add()
Now that caller already suspend the array, there is no need to suspend array in liner_add(). Note that mddev_suspend/resume() is not used anymore. Signed-off-by: Yu Kuai <[email protected]> Signed-off-by: Song Liu <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent b4128c0 commit 1978c74

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/md/md-linear.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,6 @@ static int linear_add(struct mddev *mddev, struct md_rdev *rdev)
183183
* in linear_congested(), therefore kfree_rcu() is used to free
184184
* oldconf until no one uses it anymore.
185185
*/
186-
mddev_suspend(mddev);
187186
oldconf = rcu_dereference_protected(mddev->private,
188187
lockdep_is_held(&mddev->reconfig_mutex));
189188
mddev->raid_disks++;
@@ -192,7 +191,6 @@ static int linear_add(struct mddev *mddev, struct md_rdev *rdev)
192191
rcu_assign_pointer(mddev->private, newconf);
193192
md_set_array_sectors(mddev, linear_size(mddev, 0, 0));
194193
set_capacity_and_notify(mddev->gendisk, mddev->array_sectors);
195-
mddev_resume(mddev);
196194
kfree_rcu(oldconf, rcu);
197195
return 0;
198196
}

0 commit comments

Comments
 (0)