Blob Blame History Raw
From 331b648352fb0a2cce1ac671f24adf46b1b76b38 Mon Sep 17 00:00:00 2001
From: Milind Changire <mchangir@redhat.com>
Date: Tue, 23 Oct 2018 12:47:34 +0530
Subject: [PATCH 405/406] glusterfsd: add missing UNLOCK

Reproducer steps: (by Sanju Rakonde)
1. enable brick mux
2. create 3 volumes
3. start all the 3 volumes
4. stop 1st volume, it will be success
5. stop second volume, it will time out

Problem:
Deadlock in glusterfs_handle_terminate() during volume stop of 2nd
successive volume resulting in timeout at gluster CLI.

Solution:
Add missing UNLOCK to xlator_mem_cleanup()

NOTE:
Upstream code review by Kaushal Madappa has confirmed that the code is
good at upstream. This needs to be a downstream only patch, however,
this patch is not required at a rebase so will not be marking it as
such.

Upstream patch: https://review.gluster.org/c/glusterfs/+/19734
Downstream patch: https://code.engineering.redhat.com/gerrit/152908

BUG: 1641489
Change-Id: I7281aa6f03edcb720f9eca3d274025166ff0b601
Signed-off-by: Milind Changire <mchangir@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/153643
Tested-by: RHGS Build Bot <nigelb@redhat.com>
Reviewed-by: Kaushal Madappa <kaushal@redhat.com>
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
---
 glusterfsd/src/glusterfsd-mgmt.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c
index e3fceeb..b952526 100644
--- a/glusterfsd/src/glusterfsd-mgmt.c
+++ b/glusterfsd/src/glusterfsd-mgmt.c
@@ -278,6 +278,7 @@ xlator_mem_cleanup (xlator_t *this) {
                                         break;
                         }
                 }
+                UNLOCK (&ctx->volfile_lock);
         }
 }
 
-- 
1.8.3.1