提交 0638bb0e 编写于 作者: N NeilBrown

md: simplify export_array()

We don't really need that for_each loop, or those MD_BUGs.
Signed-off-by: NNeilBrown <neilb@suse.de>
上级 4878e9eb
......@@ -2187,17 +2187,13 @@ static void kick_rdev_from_array(struct md_rdev * rdev)
static void export_array(struct mddev *mddev)
{
struct md_rdev *rdev, *tmp;
struct md_rdev *rdev;
rdev_for_each_safe(rdev, tmp, mddev) {
if (!rdev->mddev) {
MD_BUG();
continue;
}
while (!list_empty(&mddev->disks)) {
rdev = list_first_entry(&mddev->disks, struct md_rdev,
same_set);
kick_rdev_from_array(rdev);
}
if (!list_empty(&mddev->disks))
MD_BUG();
mddev->raid_disks = 0;
mddev->major_version = 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册