]> sourceware.org Git - lvm2.git/commitdiff
lvremove: drop unneded check
authorZdenek Kabelac <zkabelac@redhat.com>
Wed, 28 Feb 2018 16:37:03 +0000 (17:37 +0100)
committerZdenek Kabelac <zkabelac@redhat.com>
Wed, 28 Feb 2018 20:08:40 +0000 (21:08 +0100)
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.

lib/metadata/lv_manip.c

index 35c805ce327d353882c602e9c0313a736f3c6861..12f444b7b0629b7ee37e5bcb21accc73914fe9ab 100644 (file)
@@ -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;
 
This page took 0.046633 seconds and 5 git commands to generate.