mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-03 05:18:29 +03:00
devices file: move clean up after command is run
devices_file_exit wasn't being called between lvm_shell commands, so the file lock wouldn't be released.
This commit is contained in:
parent
a30013ff4f
commit
9dfa6f3879
@ -1905,7 +1905,6 @@ int refresh_toolcontext(struct cmd_context *cmd)
|
|||||||
_destroy_segtypes(&cmd->segtypes);
|
_destroy_segtypes(&cmd->segtypes);
|
||||||
_destroy_formats(cmd, &cmd->formats);
|
_destroy_formats(cmd, &cmd->formats);
|
||||||
|
|
||||||
devices_file_exit(cmd);
|
|
||||||
if (!dev_cache_exit())
|
if (!dev_cache_exit())
|
||||||
stack;
|
stack;
|
||||||
_destroy_dev_types(cmd);
|
_destroy_dev_types(cmd);
|
||||||
@ -2034,7 +2033,6 @@ void destroy_toolcontext(struct cmd_context *cmd)
|
|||||||
_destroy_segtypes(&cmd->segtypes);
|
_destroy_segtypes(&cmd->segtypes);
|
||||||
_destroy_formats(cmd, &cmd->formats);
|
_destroy_formats(cmd, &cmd->formats);
|
||||||
_destroy_filters(cmd);
|
_destroy_filters(cmd);
|
||||||
devices_file_exit(cmd);
|
|
||||||
dev_cache_exit();
|
dev_cache_exit();
|
||||||
_destroy_dev_types(cmd);
|
_destroy_dev_types(cmd);
|
||||||
_destroy_tags(cmd);
|
_destroy_tags(cmd);
|
||||||
|
@ -3305,6 +3305,7 @@ int lvm_run_command(struct cmd_context *cmd, int argc, char **argv)
|
|||||||
hints_exit(cmd);
|
hints_exit(cmd);
|
||||||
lvmcache_destroy(cmd, 1, 1);
|
lvmcache_destroy(cmd, 1, 1);
|
||||||
label_scan_destroy(cmd);
|
label_scan_destroy(cmd);
|
||||||
|
devices_file_exit(cmd);
|
||||||
|
|
||||||
if ((config_string_cft = remove_config_tree_by_source(cmd, CONFIG_STRING)))
|
if ((config_string_cft = remove_config_tree_by_source(cmd, CONFIG_STRING)))
|
||||||
dm_config_destroy(config_string_cft);
|
dm_config_destroy(config_string_cft);
|
||||||
|
Loading…
Reference in New Issue
Block a user