summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2016-11-11 11:48:51 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2016-11-11 21:06:49 -0800
commit72ce732fa5c9979ea6352ea98451471b721410c1 (patch)
treebcf5f1d577935d0c77f92dff01abbcacd74438c9
parent53ea680ac8a2acf0ecc48d07cb555093e1f0876f (diff)
Revert "rpc: Fix the race between notification and reconnection"
This reverts commit e6c38ae1d3f3c53f8739ab2db7c4ecfdbc58fc44. Mount is intermittently failing with this patch, which means this patch introduced another race. So until we fix that reverting this patch and making the release. BUG: 1388323 Change-Id: I6e110caf38fcc6a309b2abdc864bc4fbdb3a7588 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/15825 Reviewed-by: Raghavendra Talur <rtalur@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
-rw-r--r--rpc/rpc-lib/src/rpc-clnt.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/rpc/rpc-lib/src/rpc-clnt.c b/rpc/rpc-lib/src/rpc-clnt.c
index 3caab98..e8a8ea2 100644
--- a/rpc/rpc-lib/src/rpc-clnt.c
+++ b/rpc/rpc-lib/src/rpc-clnt.c
@@ -898,10 +898,6 @@ rpc_clnt_notify (rpc_transport_t *trans, void *mydata,
switch (event) {
case RPC_TRANSPORT_DISCONNECT:
{
- if (clnt->notifyfn)
- ret = clnt->notifyfn (clnt, clnt->mydata,
- RPC_CLNT_DISCONNECT, NULL);
-
rpc_clnt_connection_cleanup (conn);
pthread_mutex_lock (&conn->lock);
@@ -925,6 +921,9 @@ rpc_clnt_notify (rpc_transport_t *trans, void *mydata,
}
pthread_mutex_unlock (&conn->lock);
+ if (clnt->notifyfn)
+ ret = clnt->notifyfn (clnt, clnt->mydata,
+ RPC_CLNT_DISCONNECT, NULL);
if (unref_clnt)
rpc_clnt_ref (clnt);