summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 a7b2455e..ad6d0893 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 caafa9fd..da7631d1 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));