diff options
| author | Krutika Dhananjay <kdhananj@redhat.com> | 2017-04-27 11:53:24 +0530 | 
|---|---|---|
| committer | Raghavendra Talur <rtalur@redhat.com> | 2017-05-01 10:02:52 +0000 | 
| commit | 0a98c72dc0a6a00161bdc0a714e52e648b69cf24 (patch) | |
| tree | 51d91b308274da77f6f8c16b1c4d4a2f4bcf99c7 | |
| parent | eb247da4ef06e6b93c1bbe987ee76176781aa68a (diff) | |
cluster/dht: Pass the correct xdata in fremovexattr fop
Backport of:
> Change-Id: Id84bc87e48f435573eba3b24d3fb3c411fd2445d
> BUG: 1440051
> Reviewed-on: https://review.gluster.org/17126
> (cherry-picked from ab88f655e6423f51e2f2fac9265ff4d4f5c3e579)
Change-Id: Id84bc87e48f435573eba3b24d3fb3c411fd2445d
BUG: 1426508
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: https://review.gluster.org/17134
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Smoke: Gluster Build System <jenkins@build.gluster.org>
| -rw-r--r-- | xlators/cluster/dht/src/dht-common.c | 12 | 
1 files changed, 4 insertions, 8 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index ac4f9c468f7..03274f221bc 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -4569,6 +4569,7 @@ dht_fremovexattr (call_frame_t *frame, xlator_t *this,                  op_errno = EINVAL;                  goto err;          } +        local->xattr_req = xdata ? dict_ref (xdata) : dict_new ();          local->call_cnt = call_cnt = layout->cnt;          local->key = gf_strdup (key); @@ -4579,15 +4580,13 @@ dht_fremovexattr (call_frame_t *frame, xlator_t *this,                                             layout->list[i].xlator,                                             layout->list[i].xlator,                                             layout->list[i].xlator->fops->fremovexattr, -                                           fd, key, NULL); +                                           fd, key, local->xattr_req);                  }          } else {                  local->call_cnt = 1; -                xdata = xdata ? dict_ref (xdata) : dict_new (); -                if (xdata) -                        ret = dict_set_dynstr_with_alloc (xdata, +                ret = dict_set_dynstr_with_alloc (local->xattr_req,                                   DHT_IATT_IN_XDATA_KEY, "yes");                  if (ret) {                          gf_msg (this->name, GF_LOG_ERROR, ENOMEM, @@ -4598,10 +4597,7 @@ dht_fremovexattr (call_frame_t *frame, xlator_t *this,                  STACK_WIND_COOKIE (frame, dht_file_removexattr_cbk, subvol,                                     subvol, subvol->fops->fremovexattr, fd, key, -                                   xdata); - -                if (xdata) -                        dict_unref (xdata); +                                   local->xattr_req);          }          return 0;  | 
