|
|
21ab4e |
From 0fcc7f8dabf492d2e8190495a51d6626eb2c034a Mon Sep 17 00:00:00 2001
|
|
|
3604df |
From: Krutika Dhananjay <kdhananj@redhat.com>
|
|
|
3604df |
Date: Thu, 27 Apr 2017 11:53:24 +0530
|
|
|
21ab4e |
Subject: [PATCH 416/426] cluster/dht: Pass the correct xdata in fremovexattr
|
|
|
3604df |
fop
|
|
|
3604df |
|
|
|
3604df |
Backport of: https://review.gluster.org/17126
|
|
|
3604df |
|
|
|
21ab4e |
Change-Id: I3aae8a5e1c1cb375f78d33d8081db502abc94d20
|
|
|
21ab4e |
BUG: 1434653
|
|
|
3604df |
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
|
|
|
21ab4e |
Reviewed-on: https://code.engineering.redhat.com/gerrit/105210
|
|
|
21ab4e |
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
|
|
|
3604df |
---
|
|
|
21ab4e |
xlators/cluster/dht/src/dht-common.c | 12 ++++--------
|
|
|
21ab4e |
1 file changed, 4 insertions(+), 8 deletions(-)
|
|
|
3604df |
|
|
|
3604df |
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
|
|
|
21ab4e |
index 406ec21..962282a 100644
|
|
|
3604df |
--- a/xlators/cluster/dht/src/dht-common.c
|
|
|
3604df |
+++ b/xlators/cluster/dht/src/dht-common.c
|
|
|
21ab4e |
@@ -4556,6 +4556,7 @@ dht_fremovexattr (call_frame_t *frame, xlator_t *this,
|
|
|
3604df |
op_errno = EINVAL;
|
|
|
3604df |
goto err;
|
|
|
3604df |
}
|
|
|
3604df |
+ local->xattr_req = xdata ? dict_ref (xdata) : dict_new ();
|
|
|
3604df |
|
|
|
3604df |
local->call_cnt = call_cnt = layout->cnt;
|
|
|
3604df |
local->key = gf_strdup (key);
|
|
|
21ab4e |
@@ -4566,15 +4567,13 @@ dht_fremovexattr (call_frame_t *frame, xlator_t *this,
|
|
|
21ab4e |
layout->list[i].xlator,
|
|
|
21ab4e |
layout->list[i].xlator,
|
|
|
21ab4e |
layout->list[i].xlator->fops->fremovexattr,
|
|
|
21ab4e |
- fd, key, NULL);
|
|
|
21ab4e |
+ fd, key, local->xattr_req);
|
|
|
3604df |
}
|
|
|
3604df |
|
|
|
3604df |
} else {
|
|
|
3604df |
|
|
|
3604df |
local->call_cnt = 1;
|
|
|
3604df |
- xdata = xdata ? dict_ref (xdata) : dict_new ();
|
|
|
3604df |
- if (xdata)
|
|
|
21ab4e |
- ret = dict_set_int8 (xdata, DHT_IATT_IN_XDATA_KEY, 1);
|
|
|
21ab4e |
+ ret = dict_set_int8 (local->xattr_req, DHT_IATT_IN_XDATA_KEY, 1);
|
|
|
3604df |
if (ret) {
|
|
|
3604df |
gf_msg (this->name, GF_LOG_ERROR, ENOMEM,
|
|
|
3604df |
DHT_MSG_DICT_SET_FAILED, "Failed to "
|
|
|
21ab4e |
@@ -4584,10 +4583,7 @@ dht_fremovexattr (call_frame_t *frame, xlator_t *this,
|
|
|
21ab4e |
|
|
|
21ab4e |
STACK_WIND_COOKIE (frame, dht_file_removexattr_cbk, subvol,
|
|
|
21ab4e |
subvol, subvol->fops->fremovexattr, fd, key,
|
|
|
21ab4e |
- xdata);
|
|
|
3604df |
-
|
|
|
3604df |
- if (xdata)
|
|
|
3604df |
- dict_unref (xdata);
|
|
|
21ab4e |
+ local->xattr_req);
|
|
|
3604df |
}
|
|
|
3604df |
|
|
|
3604df |
return 0;
|
|
|
3604df |
--
|
|
|
3604df |
1.8.3.1
|
|
|
3604df |
|