diff options
author | Krutika Dhananjay <kdhananj@redhat.com> | 2017-04-27 11:53:24 +0530 |
---|---|---|
committer | Niels de Vos <ndevos@redhat.com> | 2017-05-03 20:42:59 +0000 |
commit | 5dbe4fa649b8c486b2abdba660a53f7ae1198ef0 (patch) | |
tree | 3f94a5f98c59cc6e59c39d9a543064cd9a4916d2 /xlators | |
parent | 6a5d9764e687b74b0686d492120584e88a6f8110 (diff) |
cluster/dht: Pass the correct xdata in fremovexattr fop
Backport of: https://review.gluster.org/17126
Change-Id: Id84bc87e48f435573eba3b24d3fb3c411fd2445d
BUG: 1440635
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: https://review.gluster.org/17148
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/cluster/dht/src/dht-common.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index a55922f0a74..c4586c2f9b1 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -4558,6 +4558,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); @@ -4567,29 +4568,23 @@ dht_fremovexattr (call_frame_t *frame, xlator_t *this, STACK_WIND (frame, dht_removexattr_cbk, 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, - DHT_IATT_IN_XDATA_KEY, "yes"); + 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, DHT_MSG_DICT_SET_FAILED, "Failed to " "set dictionary key %s for fd=%p", DHT_IATT_IN_XDATA_KEY, fd); } - STACK_WIND (frame, dht_file_removexattr_cbk, subvol, subvol->fops->fremovexattr, - fd, key, xdata); - - if (xdata) - dict_unref (xdata); + fd, key, local->xattr_req); } return 0; |