mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
cleanup: remove deallocate_handle_root arg from destroy_procesing_handle fnw
This commit is contained in:
parent
66b10d6d12
commit
969d2bf448
@ -3563,6 +3563,6 @@ int lvconvert(struct cmd_context * cmd, int argc, char **argv)
|
|||||||
else
|
else
|
||||||
ret = lvconvert_single(cmd, &lp);
|
ret = lvconvert_single(cmd, &lp);
|
||||||
out:
|
out:
|
||||||
destroy_processing_handle(cmd, handle, 1);
|
destroy_processing_handle(cmd, handle);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -314,7 +314,7 @@ int poll_daemon(struct cmd_context *cmd, const char *name, const char *uuid,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (parms.background && daemon_mode == 1) {
|
if (parms.background && daemon_mode == 1) {
|
||||||
destroy_processing_handle(cmd, handle, 1);
|
destroy_processing_handle(cmd, handle);
|
||||||
/*
|
/*
|
||||||
* child was successfully forked:
|
* child was successfully forked:
|
||||||
* background polldaemon must not return to the caller
|
* background polldaemon must not return to the caller
|
||||||
@ -325,6 +325,6 @@ int poll_daemon(struct cmd_context *cmd, const char *name, const char *uuid,
|
|||||||
_exit(lvm_return_code(ret));
|
_exit(lvm_return_code(ret));
|
||||||
}
|
}
|
||||||
|
|
||||||
destroy_processing_handle(cmd, handle, 1);
|
destroy_processing_handle(cmd, handle);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -216,6 +216,6 @@ int pvchange(struct cmd_context *cmd, int argc, char **argv)
|
|||||||
params.total - params.done, (params.total - params.done) == 1 ? "" : "s");
|
params.total - params.done, (params.total - params.done) == 1 ? "" : "s");
|
||||||
|
|
||||||
out:
|
out:
|
||||||
destroy_processing_handle(cmd, handle, 1);
|
destroy_processing_handle(cmd, handle);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -82,6 +82,6 @@ int pvresize(struct cmd_context *cmd, int argc, char **argv)
|
|||||||
log_print_unless_silent("%d physical volume(s) resized / %d physical volume(s) "
|
log_print_unless_silent("%d physical volume(s) resized / %d physical volume(s) "
|
||||||
"not resized", params.done, params.total - params.done);
|
"not resized", params.done, params.total - params.done);
|
||||||
out:
|
out:
|
||||||
destroy_processing_handle(cmd, handle, 1);
|
destroy_processing_handle(cmd, handle);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -578,7 +578,7 @@ int report_for_selection(struct cmd_context *cmd,
|
|||||||
* pass the result through it to layers above.
|
* pass the result through it to layers above.
|
||||||
*/
|
*/
|
||||||
handle->selection_handle = NULL;
|
handle->selection_handle = NULL;
|
||||||
destroy_processing_handle(cmd, handle, 1);
|
destroy_processing_handle(cmd, handle);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1615,14 +1615,12 @@ int init_selection_handle(struct cmd_context *cmd, struct processing_handle *han
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void destroy_processing_handle(struct cmd_context *cmd, struct processing_handle *handle,
|
void destroy_processing_handle(struct cmd_context *cmd, struct processing_handle *handle)
|
||||||
int deallocate_handle_root)
|
|
||||||
{
|
{
|
||||||
if (handle) {
|
if (handle) {
|
||||||
if (handle->selection_handle && handle->selection_handle->selection_rh)
|
if (handle->selection_handle && handle->selection_handle->selection_rh)
|
||||||
dm_report_free(handle->selection_handle->selection_rh);
|
dm_report_free(handle->selection_handle->selection_rh);
|
||||||
if (deallocate_handle_root)
|
dm_pool_free(cmd->mem, handle);
|
||||||
dm_pool_free(cmd->mem, handle);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1856,7 +1854,7 @@ int process_each_vg(struct cmd_context *cmd, int argc, char **argv,
|
|||||||
&arg_vgnames, &arg_tags, handle, process_single_vg);
|
&arg_vgnames, &arg_tags, handle, process_single_vg);
|
||||||
out:
|
out:
|
||||||
if (!handle_supplied)
|
if (!handle_supplied)
|
||||||
destroy_processing_handle(cmd, handle, 1);
|
destroy_processing_handle(cmd, handle);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1997,7 +1995,7 @@ int process_each_lv_in_vg(struct cmd_context *cmd, struct volume_group *vg,
|
|||||||
}
|
}
|
||||||
out:
|
out:
|
||||||
if (!handle_supplied)
|
if (!handle_supplied)
|
||||||
destroy_processing_handle(cmd, handle, 1);
|
destroy_processing_handle(cmd, handle);
|
||||||
else
|
else
|
||||||
_set_final_selection_result(handle, whole_selected);
|
_set_final_selection_result(handle, whole_selected);
|
||||||
return ret_max;
|
return ret_max;
|
||||||
@ -2257,7 +2255,7 @@ int process_each_lv(struct cmd_context *cmd, int argc, char **argv, uint32_t fla
|
|||||||
&arg_tags, handle, process_single_lv);
|
&arg_tags, handle, process_single_lv);
|
||||||
out:
|
out:
|
||||||
if (!handle_supplied)
|
if (!handle_supplied)
|
||||||
destroy_processing_handle(cmd, handle, 1);
|
destroy_processing_handle(cmd, handle);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2600,7 +2598,7 @@ static int _process_pvs_in_vg(struct cmd_context *cmd,
|
|||||||
}
|
}
|
||||||
out:
|
out:
|
||||||
if (!handle_supplied)
|
if (!handle_supplied)
|
||||||
destroy_processing_handle(cmd, handle, 1);
|
destroy_processing_handle(cmd, handle);
|
||||||
return ret_max;
|
return ret_max;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -140,8 +140,7 @@ int process_each_lv_in_vg(struct cmd_context *cmd, struct volume_group *vg,
|
|||||||
struct processing_handle *init_processing_handle(struct cmd_context *cmd);
|
struct processing_handle *init_processing_handle(struct cmd_context *cmd);
|
||||||
int init_selection_handle(struct cmd_context *cmd, struct processing_handle *handle,
|
int init_selection_handle(struct cmd_context *cmd, struct processing_handle *handle,
|
||||||
report_type_t initial_report_type);
|
report_type_t initial_report_type);
|
||||||
void destroy_processing_handle(struct cmd_context *cmd, struct processing_handle *handle,
|
void destroy_processing_handle(struct cmd_context *cmd, struct processing_handle *handle);
|
||||||
int deallocate_handle_root);
|
|
||||||
|
|
||||||
int select_match_vg(struct cmd_context *cmd, struct processing_handle *handle,
|
int select_match_vg(struct cmd_context *cmd, struct processing_handle *handle,
|
||||||
struct volume_group *vg, int *selected);
|
struct volume_group *vg, int *selected);
|
||||||
|
@ -101,6 +101,6 @@ int vgcfgbackup(struct cmd_context *cmd, int argc, char **argv)
|
|||||||
|
|
||||||
init_pvmove(0);
|
init_pvmove(0);
|
||||||
|
|
||||||
destroy_processing_handle(cmd, handle, 1);
|
destroy_processing_handle(cmd, handle);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user