summaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--xlators/features/locks/src/clear.c1
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volume-ops.c4
2 files changed, 4 insertions, 1 deletions
diff --git a/xlators/features/locks/src/clear.c b/xlators/features/locks/src/clear.c
index a7b2455e33c..ad6d0893cef 100644
--- a/xlators/features/locks/src/clear.c
+++ b/xlators/features/locks/src/clear.c
@@ -204,6 +204,7 @@ clrlk_clear_posixlk (xlator_t *this, pl_inode_t *pl_inode, clrlk_args *args,
}
pthread_mutex_unlock (&pl_inode->mutex);
grant_blocked_locks (this, pl_inode);
+ ret = 0;
out:
*blkd = bcount;
*granted = gcount;
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));