diff options
Diffstat (limited to 'xlators/cluster')
-rw-r--r-- | xlators/cluster/afr/src/afr-common.c | 10 | ||||
-rw-r--r-- | xlators/cluster/afr/src/afr-self-heal-name.c | 4 |
2 files changed, 9 insertions, 5 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index 1f68b87ef94..a7b6ee85a61 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -2511,12 +2511,16 @@ afr_lookup (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xattr_req) if (xattr_req) { /* If xattr_req was null, afr_lookup_xattr_req_prepare() will allocate one for us */ - ret = dict_get_ptr (xattr_req, "gfid-req", &gfid_req); + local->xattr_req = dict_copy_with_ref (xattr_req, NULL); + if (!local->xattr_req) { + op_errno = ENOMEM; + goto out; + } + ret = dict_get_ptr (local->xattr_req, "gfid-req", &gfid_req); if (ret == 0) { gf_uuid_copy (local->cont.lookup.gfid_req, gfid_req); - dict_del (xattr_req, "gfid-req"); + dict_del (local->xattr_req, "gfid-req"); } - local->xattr_req = dict_ref (xattr_req); } afr_read_subvol_get (loc->parent, this, NULL, &event, diff --git a/xlators/cluster/afr/src/afr-self-heal-name.c b/xlators/cluster/afr/src/afr-self-heal-name.c index d8ac170f96c..9f7a5b1ff0f 100644 --- a/xlators/cluster/afr/src/afr-self-heal-name.c +++ b/xlators/cluster/afr/src/afr-self-heal-name.c @@ -83,11 +83,11 @@ __afr_selfheal_assign_gfid (xlator_t *this, inode_t *parent, uuid_t pargfid, * __afr_selfheal_name_impunge(). */ - afr_replies_wipe (replies, priv->child_count); - AFR_ONLIST (locked_on, new_frame, afr_selfheal_discover_cbk, lookup, &loc, xdata); + afr_replies_wipe (replies, priv->child_count); + afr_replies_copy (replies, new_local->replies, priv->child_count); out: |