summaryrefslogtreecommitdiff
path: root/lib/label
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2021-11-01 16:01:09 -0500
committerDavid Teigland <teigland@redhat.com>2021-11-01 16:01:45 -0500
commit5d0964d127ea62da480cafc91fefe403dda86870 (patch)
treeca0b4f8cf96423c6465005fb26a2e1b311f3873c /lib/label
parentb65a2c3f3a76739fb75a4a3a868cc9f143740052 (diff)
downloadlvm2-5d0964d127ea62da480cafc91fefe403dda86870.tar.gz
hints: remove the cmd hints list
which is no longer used after commit "toollib: remove all devices list from process_each_pv"
Diffstat (limited to 'lib/label')
-rw-r--r--lib/label/hints.c1
-rw-r--r--lib/label/label.c8
2 files changed, 2 insertions, 7 deletions
diff --git a/lib/label/hints.c b/lib/label/hints.c
index 3dba9f8ec..e444a0c82 100644
--- a/lib/label/hints.c
+++ b/lib/label/hints.c
@@ -365,7 +365,6 @@ static void _unlock_hints(struct cmd_context *cmd)
void hints_exit(struct cmd_context *cmd)
{
- free_hints(&cmd->hints);
if (_hints_fd == -1)
return;
_unlock_hints(cmd);
diff --git a/lib/label/label.c b/lib/label/label.c
index 3cd912270..479a5037a 100644
--- a/lib/label/label.c
+++ b/lib/label/label.c
@@ -1207,8 +1207,6 @@ int label_scan(struct cmd_context *cmd)
(unsigned long long)want_size_kb);
}
- dm_list_init(&cmd->hints);
-
/*
* If we're using hints to limit which devs we scanned, verify
* that those hints were valid, and if not we need to scan the
@@ -1220,18 +1218,16 @@ int label_scan(struct cmd_context *cmd)
_scan_list(cmd, cmd->filter, &all_devs, 0, NULL);
/* scan_devs are the devs that have been scanned */
dm_list_splice(&scan_devs, &all_devs);
- free_hints(&hints_list);
using_hints = 0;
create_hints = 0;
/* invalid hints means a new dev probably appeared and
we should search for any missing pvids again. */
unlink_searched_devnames(cmd);
- } else {
- /* The hints may be used by another device iteration. */
- dm_list_splice(&cmd->hints, &hints_list);
}
}
+ free_hints(&hints_list);
+
/*
* Check if the devices_file content is up to date and
* if not update it.