summaryrefslogtreecommitdiffstats
path: root/xlators/features/locks/src/posix.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/features/locks/src/posix.c')
-rw-r--r--xlators/features/locks/src/posix.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/xlators/features/locks/src/posix.c b/xlators/features/locks/src/posix.c
index 6a1f429e8eb..3f1c7a733ff 100644
--- a/xlators/features/locks/src/posix.c
+++ b/xlators/features/locks/src/posix.c
@@ -2297,10 +2297,9 @@ __fd_has_locks(pl_inode_t *pl_inode, fd_t *fd)
static posix_lock_t *
lock_dup(posix_lock_t *lock)
{
- int32_t op_errno = 0;
return new_posix_lock(&lock->user_flock, lock->client, lock->client_pid,
&lock->owner, (fd_t *)lock->fd_num, lock->lk_flags,
- lock->blocking, &op_errno);
+ lock->blocking);
}
static int
@@ -2517,11 +2516,11 @@ pl_lk(call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t cmd,
}
reqlock = new_posix_lock(flock, frame->root->client, frame->root->pid,
- &frame->root->lk_owner, fd, lk_flags, can_block,
- &op_errno);
+ &frame->root->lk_owner, fd, lk_flags, can_block);
if (!reqlock) {
op_ret = -1;
+ op_errno = ENOMEM;
goto unwind;
}