1
0
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:
Zdenek Kabelac 2016-12-14 11:34:28 +01:00
parent fecd043cca
commit 0f98d5c2e6
2 changed files with 4 additions and 9 deletions

View File

@ -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);
} }
/* /*

View File

@ -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;