diff options
author | Atin Mukherjee <amukherj@redhat.com> | 2019-04-16 22:14:47 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2019-04-17 08:17:29 +0000 |
commit | 785f3276d2e325a991b64aed66a326ea95fffef3 (patch) | |
tree | 0ccd327225b01e4d3eba2d26051dfe6ff7f335df /xlators/features/locks/src/inodelk.c | |
parent | b922793588ad23a9b12ce65abd29e8f45ac87998 (diff) |
Revert "features/locks: error-out {inode,entry}lk fops with all-zero lk-owner"
This reverts commit 3883887427a7f2dc458a9773e05f7c8ce8e62301 as it has
broken sdfs-sanity.t.
Updates: bz#1624701
Change-Id: Icb2b0d6bfcce4d556f1cd0f11695c03ffc138736
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'xlators/features/locks/src/inodelk.c')
-rw-r--r-- | xlators/features/locks/src/inodelk.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/xlators/features/locks/src/inodelk.c b/xlators/features/locks/src/inodelk.c index 95afc902ffa..df00ede242d 100644 --- a/xlators/features/locks/src/inodelk.c +++ b/xlators/features/locks/src/inodelk.c @@ -873,23 +873,17 @@ pl_inode_setlk(xlator_t *this, pl_ctx_t *ctx, pl_inode_t *pl_inode, } /* Create a new inode_lock_t */ -static pl_inode_lock_t * +pl_inode_lock_t * new_inode_lock(struct gf_flock *flock, client_t *client, pid_t client_pid, call_frame_t *frame, xlator_t *this, const char *volume, - char *conn_id, int32_t *op_errno) + char *conn_id) { pl_inode_lock_t *lock = NULL; - if (!pl_is_lk_owner_valid(&frame->root->lk_owner, frame->root->client)) { - *op_errno = EINVAL; - goto out; - } - lock = GF_CALLOC(1, sizeof(*lock), gf_locks_mt_pl_inode_lock_t); if (!lock) { - *op_errno = ENOMEM; - goto out; + return NULL; } lock->fl_start = flock->l_start; @@ -917,7 +911,6 @@ new_inode_lock(struct gf_flock *flock, client_t *client, pid_t client_pid, INIT_LIST_HEAD(&lock->contend); __pl_inodelk_ref(lock); -out: return lock; } @@ -1012,10 +1005,11 @@ pl_common_inodelk(call_frame_t *frame, xlator_t *this, const char *volume, } reqlock = new_inode_lock(flock, frame->root->client, frame->root->pid, - frame, this, dom->domain, conn_id, &op_errno); + frame, this, dom->domain, conn_id); if (!reqlock) { op_ret = -1; + op_errno = ENOMEM; goto unwind; } |