summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
authorKrishnan Parthasarathi <kp@gluster.com>2012-02-24 14:59:43 +0530
committerVijay Bellur <vijay@gluster.com>2012-02-27 04:39:34 -0800
commitc1e3d3b963a46fb92d309ac3d0a11adfad8ce745 (patch)
tree9d6806bda618cd4eb94f83f8df47d56d4112d4ff /xlators/mgmt
parent19dd4b7f0080a1924099ace7e3d7fcd9f0314f2d (diff)
locks/glusterd: Fixed clearing of posix locks from failing always.
Change-Id: Ieaf636c6f0d2aa1d001143a2d1433fce85dc8c7a BUG: 797042 Signed-off-by: Krishnan Parthasarathi <kp@gluster.com> Reviewed-on: http://review.gluster.com/2812 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volume-ops.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
index caafa9fd094..da7631d1677 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
@@ -1556,10 +1556,12 @@ glusterd_clearlocks_send_cmd (glusterd_volinfo_t *volinfo, char *cmd,
{
int ret = -1;
glusterd_conf_t *priv = NULL;
+ char abspath[PATH_MAX] = {0, };
priv = THIS->private;
- ret = sys_lgetxattr (mntpt, cmd, result, PATH_MAX);
+ snprintf (abspath, sizeof (abspath), "%s/%s", mntpt, path);
+ ret = sys_lgetxattr (abspath, cmd, result, PATH_MAX);
if (ret < 0) {
snprintf (errstr, err_len, "clear-locks getxattr command "
"failed. Reason: %s", strerror (errno));