summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2020-09-26 19:32:52 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2020-09-29 10:43:56 +0200
commit08e838f488415ce6c7df594327c383cdc7c2dcd7 (patch)
treebe1eeae45b19712cd0a7769ff5e1bccae7ca9468
parentaf5f29c7e2f07005462d505c57a2f1440c9d50a3 (diff)
downloadlvm2-08e838f488415ce6c7df594327c383cdc7c2dcd7.tar.gz
cleanup: avoid unneeded check
Since creation of thin snapshot already makes sure, the message list is empty, there is no need to check this again.
-rw-r--r--lib/metadata/lv_manip.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c
index ce532ab92..793a86d1f 100644
--- a/lib/metadata/lv_manip.c
+++ b/lib/metadata/lv_manip.c
@@ -8482,8 +8482,7 @@ static struct logical_volume *_lv_create_an_lv(struct volume_group *vg,
stack;
goto revert_new_lv;
}
- }
- if (!dm_list_empty(&first_seg(pool_lv)->thin_messages)) {
+ } else if (!dm_list_empty(&first_seg(pool_lv)->thin_messages)) {
/* Send message so that table preload knows new thin */
if (!lv_is_active(pool_lv)) {
/* Avoid multiple thin-pool activations in this case */