Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <yukuai3@huawei.com>
Signed-off-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20231010151958.145896-16-yukuai1@huaweicloud.com

authored by

Yu Kuai and committed by
Song Liu
1978c742 b4128c00

-2
-2
drivers/md/md-linear.c
··· 183 183 * in linear_congested(), therefore kfree_rcu() is used to free 184 184 * oldconf until no one uses it anymore. 185 185 */ 186 - mddev_suspend(mddev); 187 186 oldconf = rcu_dereference_protected(mddev->private, 188 187 lockdep_is_held(&mddev->reconfig_mutex)); 189 188 mddev->raid_disks++; ··· 191 192 rcu_assign_pointer(mddev->private, newconf); 192 193 md_set_array_sectors(mddev, linear_size(mddev, 0, 0)); 193 194 set_capacity_and_notify(mddev->gendisk, mddev->array_sectors); 194 - mddev_resume(mddev); 195 195 kfree_rcu(oldconf, rcu); 196 196 return 0; 197 197 }