summaryrefslogtreecommitdiffstats
path: root/xlators/cluster
diff options
context:
space:
mode:
authorKrishnan Parthasarathi <kp@gluster.com>2012-03-12 17:34:32 +0530
committerVijay Bellur <vijay@gluster.com>2012-03-14 10:58:35 -0700
commit48adf93423ba52f2a0e6d9d59060e6f2f1aa203c (patch)
treef70aa7699db1bd8a8504aeaf8c5d4ee97c4e5c03 /xlators/cluster
parentbf65ae4fef113d78b7555db8520cd9f64817eda2 (diff)
afr: Corrected getxattr 'key' matching in case of clrlk cmd
- Added local->dict cleanup into afr_local_cleanup Change-Id: Ie1b96615735a9d2a2be1757cd016dbe225aae31c BUG: 800412 Signed-off-by: Krishnan Parthasarathi <kp@gluster.com> Reviewed-on: http://review.gluster.com/2922 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/cluster')
-rw-r--r--xlators/cluster/afr/src/afr-common.c3
-rw-r--r--xlators/cluster/afr/src/afr-inode-read.c12
2 files changed, 5 insertions, 10 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c
index 4eafed34232..31854b13838 100644
--- a/xlators/cluster/afr/src/afr-common.c
+++ b/xlators/cluster/afr/src/afr-common.c
@@ -841,6 +841,9 @@ afr_local_cleanup (afr_local_t *local, xlator_t *this)
if (local->xattr_req)
dict_unref (local->xattr_req);
+ if (local->dict)
+ dict_unref (local->dict);
+
if (local->child_up)
GF_FREE (local->child_up);
diff --git a/xlators/cluster/afr/src/afr-inode-read.c b/xlators/cluster/afr/src/afr-inode-read.c
index c4619270207..6c837c3371e 100644
--- a/xlators/cluster/afr/src/afr-inode-read.c
+++ b/xlators/cluster/afr/src/afr-inode-read.c
@@ -713,12 +713,6 @@ unlock:
priv->child_count);
AFR_STACK_UNWIND (getxattr, frame, op_ret, op_errno, xattr);
- if (local->dict)
- dict_unref (local->dict);
-
- if (local->child_errno)
- GF_FREE (local->child_errno);
-
if (xattr)
dict_unref (xattr);
}
@@ -879,9 +873,6 @@ afr_getxattr_pathinfo_cbk (call_frame_t *frame, void *cookie,
unwind:
AFR_STACK_UNWIND (getxattr, frame, op_ret, op_errno, nxattr);
- if (local->dict)
- dict_unref (local->dict);
-
if (nxattr)
dict_unref (nxattr);
}
@@ -903,7 +894,8 @@ afr_is_special_xattr (const char *name, fop_getxattr_cbk_t *cbk)
if (!strcmp (name, GF_XATTR_PATHINFO_KEY))
*cbk = afr_getxattr_pathinfo_cbk;
- else if (!strcmp (name, GF_XATTR_CLRLK_CMD))
+ else if (!strncmp (name, GF_XATTR_CLRLK_CMD,
+ strlen (GF_XATTR_CLRLK_CMD)))
*cbk = afr_getxattr_clrlk_cbk;
else
is_spl = _gf_false;