mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
cleanup: use exiting function
Reuse existing code and some indent change.
This commit is contained in:
parent
fecd043cca
commit
0f98d5c2e6
@ -6258,12 +6258,12 @@ static int _lv_update_and_reload(struct logical_volume *lv, int origin_only)
|
|||||||
|
|
||||||
int lv_update_and_reload(struct logical_volume *lv)
|
int lv_update_and_reload(struct logical_volume *lv)
|
||||||
{
|
{
|
||||||
return _lv_update_and_reload(lv, 0);
|
return _lv_update_and_reload(lv, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int lv_update_and_reload_origin(struct logical_volume *lv)
|
int lv_update_and_reload_origin(struct logical_volume *lv)
|
||||||
{
|
{
|
||||||
return _lv_update_and_reload(lv, 1);
|
return _lv_update_and_reload(lv, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1464,13 +1464,8 @@ int lv_raid_split(struct logical_volume *lv, const char *split_name,
|
|||||||
/*
|
/*
|
||||||
* Eliminate the residual LVs
|
* Eliminate the residual LVs
|
||||||
*/
|
*/
|
||||||
dm_list_iterate_items(lvl, &removal_lvs) {
|
if (!_deactivate_and_remove_lvs(lv->vg, &removal_lvs))
|
||||||
if (!deactivate_lv(cmd, lvl->lv))
|
return_0;
|
||||||
return_0;
|
|
||||||
|
|
||||||
if (!lv_remove(lvl->lv))
|
|
||||||
return_0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!vg_write(lv->vg) || !vg_commit(lv->vg))
|
if (!vg_write(lv->vg) || !vg_commit(lv->vg))
|
||||||
return_0;
|
return_0;
|
||||||
|
Loading…
Reference in New Issue
Block a user