Skip to contentSkip to conversation

main - cleanup: simplier check first

PATCH Zdenek Kabelac 1 participant 1 message Mar 18, 2021

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=d682ad619a50827116fb83ff98efa0e5b8821956
Commit:        d682ad619a50827116fb83ff98efa0e5b8821956
Parent:        a481fdaa3529a85e0cde652f79b98b2337c296cb
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Wed Mar 17 08:56:23 2021 +0100
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Thu Mar 18 18:34:57 2021 +0100

cleanup: simplier check first

---
 lib/metadata/lv_manip.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
lib/metadata/lv_manip.c +1 -2
index 12b1505df..84667f445 100644
@@ -8471,10 +8471,9 @@ static struct logical_volume *_lv_create_an_lv(struct volume_group *vg,
 	/* Unlock memory if possible */
 	memlock_unlock(vg->cmd);
 
-	if (segtype_is_vdo(create_segtype) && pool_lv) {
+	if (pool_lv && segtype_is_vdo(create_segtype))
 		if (!set_lv_segment_area_lv(first_seg(lv), 0, pool_lv, 0, LV_VDO_POOL))
 			return_NULL;
-	}
 
 	if (lv_is_cache_pool(lv)) {
 		if (!cache_set_params(first_seg(lv),