summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/features/locks/src/entrylk.c9
-rw-r--r--xlators/features/locks/src/inodelk.c6
2 files changed, 3 insertions, 12 deletions
diff --git a/xlators/features/locks/src/entrylk.c b/xlators/features/locks/src/entrylk.c
index 4231d760cdc..626541237b3 100644
--- a/xlators/features/locks/src/entrylk.c
+++ b/xlators/features/locks/src/entrylk.c
@@ -701,12 +701,6 @@ pl_common_entrylk (call_frame_t *frame, xlator_t *this,
gf_log (this->name, GF_LOG_WARNING,
"MONKEY LOCKING (forcing stuck lock)!");
op_ret = 0;
- need_inode_unref = _gf_true;
- pthread_mutex_lock (&pinode->mutex);
- {
- __pl_entrylk_unref (reqlock);
- }
- pthread_mutex_unlock (&pinode->mutex);
goto out;
}
}
@@ -790,6 +784,7 @@ pl_common_entrylk (call_frame_t *frame, xlator_t *this,
"a bug report at http://bugs.gluster.com", cmd);
goto out;
}
+
/* The following (extra) unref corresponds to the ref that
* was done at the time the lock was granted.
*/
@@ -884,6 +879,8 @@ pl_entrylk_client_cleanup (xlator_t *this, pl_ctx_t *ctx)
{
list_for_each_entry_safe (l, tmp, &ctx->entrylk_lockers,
client_list) {
+ list_del_init (&l->client_list);
+
pl_entrylk_log_cleanup (l);
pinode = l->pinode;
diff --git a/xlators/features/locks/src/inodelk.c b/xlators/features/locks/src/inodelk.c
index e1702c78ba1..275fb9d20e4 100644
--- a/xlators/features/locks/src/inodelk.c
+++ b/xlators/features/locks/src/inodelk.c
@@ -645,12 +645,6 @@ pl_inode_setlk (xlator_t *this, pl_ctx_t *ctx, pl_inode_t *pl_inode,
__inodelk_prune_stale (this, pl_inode, dom, lock);
} else if (priv->monkey_unlocking == _gf_true) {
if (pl_does_monkey_want_stuck_lock ()) {
- pthread_mutex_lock (&pl_inode->mutex);
- {
- __pl_inodelk_unref (lock);
- }
- pthread_mutex_unlock (&pl_inode->mutex);
- inode_unref (pl_inode->inode);
gf_log (this->name, GF_LOG_WARNING,
"MONKEY LOCKING (forcing stuck lock)!");
return 0;