]> sourceware.org Git - lvm2.git/commitdiff
cleanup: remove deallocate_handle_root arg from destroy_procesing_handle fnw
authorPeter Rajnoha <prajnoha@redhat.com>
Fri, 13 Feb 2015 09:42:21 +0000 (10:42 +0100)
committerPeter Rajnoha <prajnoha@redhat.com>
Fri, 13 Feb 2015 10:27:09 +0000 (11:27 +0100)
tools/lvconvert.c
tools/polldaemon.c
tools/pvchange.c
tools/pvresize.c
tools/reporter.c
tools/toollib.c
tools/toollib.h
tools/vgcfgbackup.c

index b2527e40f14c483d83ece26931f2658d9e28f296..3bbe65fdfad42fe8c52d7fd915c6626b30c9efb1 100644 (file)
@@ -3563,6 +3563,6 @@ int lvconvert(struct cmd_context * cmd, int argc, char **argv)
        else
                ret = lvconvert_single(cmd, &lp);
 out:
-       destroy_processing_handle(cmd, handle, 1);
+       destroy_processing_handle(cmd, handle);
        return ret;
 }
index 722a385bf540bb76c93936d689c21df4b1a8f09d..10ca4a56e77ada833872559f5db241bd8c825134 100644 (file)
@@ -314,7 +314,7 @@ int poll_daemon(struct cmd_context *cmd, const char *name, const char *uuid,
        }
 
        if (parms.background && daemon_mode == 1) {
-               destroy_processing_handle(cmd, handle, 1);
+               destroy_processing_handle(cmd, handle);
                /*
                 * child was successfully forked:
                 * 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));
        }
 
-       destroy_processing_handle(cmd, handle, 1);
+       destroy_processing_handle(cmd, handle);
        return ret;
 }
index a8414c10d812c1223d9cfb5c1d9e7118ab521ee3..c3e9215b5e041f786d7b261082976b4e927128e6 100644 (file)
@@ -216,6 +216,6 @@ int pvchange(struct cmd_context *cmd, int argc, char **argv)
                                params.total - params.done, (params.total - params.done) == 1 ? "" : "s");
 
 out:
-       destroy_processing_handle(cmd, handle, 1);
+       destroy_processing_handle(cmd, handle);
        return ret;
 }
index ec638a47c4c4941b313f67fdda0b27ca87346eb9..0f992a212b40491f25719c5e33006f4d60ce3317 100644 (file)
@@ -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) "
                                "not resized", params.done, params.total - params.done);
 out:
-       destroy_processing_handle(cmd, handle, 1);
+       destroy_processing_handle(cmd, handle);
        return ret;
 }
index 9cc87bd011beaaaa1e66691e4f3ff9071c53ad77..eb62bcfe705ac7712a34684288fed98ef9561732 100644 (file)
@@ -578,7 +578,7 @@ int report_for_selection(struct cmd_context *cmd,
         * pass the result through it to layers above.
         */
        handle->selection_handle = NULL;
-       destroy_processing_handle(cmd, handle, 1);
+       destroy_processing_handle(cmd, handle);
        return r;
 }
 
index 4e0d0e7a6f9e1cdf4a0132cff3a63df74bbcb614..b0f603b1dc543acf4175a6fa7738750b0a29007a 100644 (file)
@@ -1615,14 +1615,12 @@ int init_selection_handle(struct cmd_context *cmd, struct processing_handle *han
        return 1;
 }
 
-void destroy_processing_handle(struct cmd_context *cmd, struct processing_handle *handle,
-                              int deallocate_handle_root)
+void destroy_processing_handle(struct cmd_context *cmd, struct processing_handle *handle)
 {
        if (handle) {
                if (handle->selection_handle && 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);
 out:
        if (!handle_supplied)
-               destroy_processing_handle(cmd, handle, 1);
+               destroy_processing_handle(cmd, handle);
        return ret;
 }
 
@@ -1997,7 +1995,7 @@ int process_each_lv_in_vg(struct cmd_context *cmd, struct volume_group *vg,
        }
 out:
        if (!handle_supplied)
-               destroy_processing_handle(cmd, handle, 1);
+               destroy_processing_handle(cmd, handle);
        else
                _set_final_selection_result(handle, whole_selected);
        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);
 out:
        if (!handle_supplied)
-               destroy_processing_handle(cmd, handle, 1);
+               destroy_processing_handle(cmd, handle);
        return ret;
 }
 
@@ -2600,7 +2598,7 @@ static int _process_pvs_in_vg(struct cmd_context *cmd,
        }
 out:
        if (!handle_supplied)
-               destroy_processing_handle(cmd, handle, 1);
+               destroy_processing_handle(cmd, handle);
        return ret_max;
 }
 
index 3a2c5f83e14a4195ac37b84c8fce6d9e66e62ea3..7486d4406560df40fe2d0f499633eb209145bb21 100644 (file)
@@ -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);
 int init_selection_handle(struct cmd_context *cmd, struct processing_handle *handle,
                          report_type_t initial_report_type);
-void destroy_processing_handle(struct cmd_context *cmd, struct processing_handle *handle,
-                              int deallocate_handle_root);
+void destroy_processing_handle(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);
index a25a7185a2e38f6a18fefbb10f59b1d29695c1cb..5e80c806adff131ad51546b9891caaefe4e3228b 100644 (file)
@@ -101,6 +101,6 @@ int vgcfgbackup(struct cmd_context *cmd, int argc, char **argv)
 
        init_pvmove(0);
 
-       destroy_processing_handle(cmd, handle, 1);
+       destroy_processing_handle(cmd, handle);
        return ret;
 }
This page took 0.056501 seconds and 5 git commands to generate.