diff --git a/libdm/libdm-deptree.c b/libdm/libdm-deptree.c index dcaa593dc..4c9eaad81 100644 --- a/libdm/libdm-deptree.c +++ b/libdm/libdm-deptree.c @@ -1419,6 +1419,9 @@ int dm_tree_activate_children(struct dm_tree_node *dnode, for (priority = 0; priority < 3; priority++) { while ((child = dm_tree_next_child(&handle, dnode, 0))) { + if (priority != child->activation_priority) + continue; + if (!(uuid = dm_tree_node_get_uuid(child))) { stack; continue; @@ -1427,9 +1430,6 @@ int dm_tree_activate_children(struct dm_tree_node *dnode, if (!_uuid_prefix_matches(uuid, uuid_prefix, uuid_prefix_len)) continue; - if (priority != child->activation_priority) - continue; - if (!(name = dm_tree_node_get_name(child))) { stack; continue;