diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2022-07-09 02:50:08 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2022-07-11 01:18:24 +0200 |
commit | 4d2f9a4ff3fbfe4ee0df08478d81ea10f75823de (patch) | |
tree | ca58a61b8bd578527ef9e23fabdbe86da77c0eeb | |
parent | 5c463584f6b0541cc0144335b49afd2d94745928 (diff) | |
download | lvm2-4d2f9a4ff3fbfe4ee0df08478d81ea10f75823de.tar.gz |
cov: restore disable_dm_devs also for error path
Keep the structure correct for failing error path,
alhtough likely this particual var will not be used.
-rw-r--r-- | lib/activate/dev_manager.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c index 2cae3bed1..8cb31008e 100644 --- a/lib/activate/dev_manager.c +++ b/lib/activate/dev_manager.c @@ -3842,11 +3842,12 @@ static int _tree_action(struct dev_manager *dm, const struct logical_volume *lv, if (!seg_is_striped_target(first_seg(lv)) || (action == CLEAN)) dm->cmd->disable_dm_devs = 1; - if (!(dtree = _create_partial_dtree(dm, lv, laopts->origin_only))) - return_0; - + dtree = _create_partial_dtree(dm, lv, laopts->origin_only); dm->cmd->disable_dm_devs = tmp_state; + if (!dtree) + return_0; + if (!(root = dm_tree_find_node(dtree, 0, 0))) { log_error("Lost dependency tree root node."); goto out_no_root; |