summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
authorYaniv Kaul <ykaul@redhat.com>2018-08-19 08:08:23 +0300
committerAmar Tumballi <amarts@redhat.com>2018-09-04 05:32:10 +0000
commit8b913eb752be422a362329d02dfb5c76754ad151 (patch)
tree16db9121e6f931630f1bf99fb1ef0aeb9ef4d33f /xlators/mgmt
parent5276e8f27e3021d5da3d3055caed6f9a1d964c93 (diff)
{dht-rebalance|glusterd-geo-rep|glusterd-utils|nfs|bd}.c: no dict_del before dict_set
There is no need to remove an item before re-setting it. Compile-tested only! Change-Id: I2869aec9ebf474859127b8b38d284246e6097e84 updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-geo-rep.c3
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c2
2 files changed, 0 insertions, 5 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
index 8299971f6c7..c6ddf6ca6f6 100644
--- a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
+++ b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c
@@ -1792,9 +1792,6 @@ glusterd_store_slave_in_info (glusterd_volinfo_t *volinfo, char *slave,
} else if (ret == -1) { /* Existing slave */
snprintf (key, 512, "slave%d", slave1.old_slvidx);
- /* Delete present slave info(with old hostname) */
- dict_del (volinfo->gsync_slaves, key);
-
gf_msg_debug (this->name, 0, "Replacing key:%s with new value"
":%s", key, value);
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index 612fa35f90b..1adf38faed1 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -9962,7 +9962,6 @@ glusterd_profile_volume_use_rsp_dict (dict_t *aggr, dict_t *rsp_dict)
rsp_ctx.count = count;
rsp_ctx.dict = ctx_dict;
dict_foreach (rsp_dict, _profile_volume_add_friend_rsp, &rsp_ctx);
- dict_del (ctx_dict, "count");
ret = dict_set_int32 (ctx_dict, "count", count + brick_count);
out:
return ret;
@@ -11548,7 +11547,6 @@ glusterd_profile_volume_brick_rsp (void *pending_entry,
rsp_ctx.count = count;
rsp_ctx.dict = op_ctx;
dict_foreach (rsp_dict, _profile_volume_add_brick_rsp, &rsp_ctx);
- dict_del (op_ctx, "count");
ret = dict_set_int32 (op_ctx, "count", count);
return ret;
}