Blob Blame History Raw
From 6ff5d5187500246e662421cef24cc81125c5c47f Mon Sep 17 00:00:00 2001
From: Pranith Kumar K <pkarampu@redhat.com>
Date: Wed, 20 Jun 2018 14:56:25 +0530
Subject: [PATCH 677/678] cluster/afr: Increase the lock-count on success

While backporting eager-lock feature I missed this line, because of this
afr always falls back to blocking locks thinking it didn't get all the
nonblocking locks even when it gets them.

BUG: 1594682
Change-Id: I047aebd23528b872a6b556bcf3a770d612ae550d
Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/142316
Reviewed-by: Xavi Hernandez <xhernandez@redhat.com>
Tested-by: RHGS Build Bot <nigelb@redhat.com>
---
 xlators/cluster/afr/src/afr-lk-common.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/xlators/cluster/afr/src/afr-lk-common.c b/xlators/cluster/afr/src/afr-lk-common.c
index 494a63c..0c3ac60 100644
--- a/xlators/cluster/afr/src/afr-lk-common.c
+++ b/xlators/cluster/afr/src/afr-lk-common.c
@@ -976,6 +976,7 @@ afr_nonblocking_inodelk_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
 			}
 		} else {
                         int_lock->locked_nodes[child_index] |= LOCKED_YES;
+                        int_lock->lock_count++;
 		}
 
                 call_count = --int_lock->lk_call_count;
-- 
1.8.3.1