summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-volgen.c
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2016-01-06 14:30:08 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2016-07-25 23:47:33 -0700
commitd2bd17e5a53d0ffa375df1a5ad957556be2f2b83 (patch)
tree872633e25252817ee332d0b64a92cd64eba7464b /xlators/mgmt/glusterd/src/glusterd-volgen.c
parent558a45fa527b01ec81904150532a8b661c06ae8a (diff)
dict: Don't expose get_new_dict/dict_destroy
get_new_dict/dict_destroy is causing confusion where, dict_new/dict_destroy or get_new_dict/dict_unref are used instead of dict_new/dict_unref. Change-Id: I4cc69f5b6711d720823395e20fd624a0c6c1168c BUG: 1296043 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/13183 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-volgen.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index 6a755486d7d..9eefd2a8491 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -93,7 +93,7 @@ xlator_instantiate_va (const char *type, const char *format, va_list arg)
ret = xlator_set_type_virtual (xl, type);
if (ret)
goto error;
- xl->options = get_new_dict();
+ xl->options = dict_new ();
if (!xl->options)
goto error;
xl->name = volname;
@@ -1065,7 +1065,7 @@ build_graph_generic (volgen_graph_t *graph, glusterd_volinfo_t *volinfo,
int ret = 0;
if (mod_dict) {
- set_dict = dict_copy (volinfo->dict, NULL);
+ set_dict = dict_copy_with_ref (volinfo->dict, NULL);
if (!set_dict)
return -1;
dict_copy (mod_dict, set_dict);
@@ -1079,7 +1079,7 @@ build_graph_generic (volgen_graph_t *graph, glusterd_volinfo_t *volinfo,
ret = volgen_graph_set_options (graph, set_dict);
if (mod_dict)
- dict_destroy (set_dict);
+ dict_unref (set_dict);
return ret;
}
@@ -4798,7 +4798,7 @@ build_rebalance_volfile (glusterd_volinfo_t *volinfo, char *filepath,
return 0;
}
- set_dict = dict_copy (volinfo->dict, NULL);
+ set_dict = dict_copy_with_ref (volinfo->dict, NULL);
if (!set_dict)
return -1;
@@ -4840,7 +4840,7 @@ build_rebalance_volfile (glusterd_volinfo_t *volinfo, char *filepath,
out:
volgen_graph_free (&graph);
- dict_destroy (set_dict);
+ dict_unref (set_dict);
return ret;
}
@@ -5106,7 +5106,7 @@ build_nfs_graph (volgen_graph_t *graph, dict_t *mod_dict)
out:
gf_msg_debug ("glusterd", 0, "Returning %d", ret);
- dict_destroy (set_dict);
+ dict_unref (set_dict);
return ret;
}