From: Zdenek Kabelac Date: Wed, 28 Feb 2018 16:37:03 +0000 (+0100) Subject: lvremove: drop unneded check X-Git-Tag: v2_02_178-rc1~191 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=b09ea3b6f764f6a853b816da65aeb3d0d351f77c;p=lvm2.git lvremove: drop unneded check Checking here for cache_pool is not necessary and in effect the check is not even right - since there are internal states that do allow to active such LV. --- diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c index 35c805ce3..12f444b7b 100644 --- a/lib/metadata/lv_manip.c +++ b/lib/metadata/lv_manip.c @@ -6033,8 +6033,7 @@ int lv_remove_single(struct cmd_context *cmd, struct logical_volume *lv, /* FIXME Ensure not referred to by another existing LVs */ ask_discard = find_config_tree_bool(cmd, devices_issue_discards_CFG, NULL); - if (!lv_is_cache_pool(lv) && /* cache pool cannot be active */ - lv_is_active(lv)) { + if (lv_is_active(lv)) { if (!lv_check_not_in_use(lv, 1)) return_0;