summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
Diffstat (limited to 'xlators')
-rw-r--r--xlators/cluster/afr/src/afr-common.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c
index 04191649b4c..8fc202512f1 100644
--- a/xlators/cluster/afr/src/afr-common.c
+++ b/xlators/cluster/afr/src/afr-common.c
@@ -679,10 +679,13 @@ afr_lookup_xattr_req_prepare (afr_local_t *local, xlator_t *this,
{
int ret = -ENOMEM;
- local->xattr_req = dict_new ();
+ if (!local->xattr_req)
+ local->xattr_req = dict_new ();
+
if (!local->xattr_req)
goto out;
- if (xattr_req)
+
+ if (xattr_req != local->xattr_req)
dict_copy (xattr_req, local->xattr_req);
ret = afr_xattr_req_prepare (this, local->xattr_req);