summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/cluster/dht/src/dht-rebalance.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c
index 358d221c81c..3c976b113fa 100644
--- a/xlators/cluster/dht/src/dht-rebalance.c
+++ b/xlators/cluster/dht/src/dht-rebalance.c
@@ -1444,6 +1444,12 @@ gf_defrag_migrate_data (xlator_t *this, gf_defrag_info_t *defrag, loc_t *loc,
free_entries = _gf_true;
list_for_each_entry_safe (entry, tmp, &entries.list, list) {
+
+ if (dict) {
+ dict_unref (dict);
+ dict = NULL;
+ }
+
if (defrag->defrag_status != GF_DEFRAG_STATUS_STARTED) {
ret = 1;
goto out;
@@ -1550,9 +1556,6 @@ gf_defrag_migrate_data (xlator_t *this, gf_defrag_info_t *defrag, loc_t *loc,
uuid_str = NULL;
- dict_del (dict, GF_XATTR_NODE_UUID_KEY);
-
-
/* if distribute is present, it will honor this key.
* -1, ENODATA is returned if distribute is not present
* or file doesn't have a link-file. If file has
@@ -1560,7 +1563,7 @@ gf_defrag_migrate_data (xlator_t *this, gf_defrag_info_t *defrag, loc_t *loc,
* and also that guarantees that file has to be mostly
* migrated */
- ret = syncop_getxattr (this, &entry_loc, &dict,
+ ret = syncop_getxattr (this, &entry_loc, NULL,
GF_XATTR_LINKINFO_KEY);
if (ret < 0) {
if (-ret != ENODATA) {