summaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorPranith Kumar Karampuri <pkarampu@redhat.com>2016-11-13 06:53:15 -0700
committerPranith Kumar Karampuri <pkarampu@redhat.com>2016-11-16 01:25:31 -0800
commit922af37e33acb59c6f8beca40a9314593b484d1a (patch)
treef1f78d368b84cd50b73bf2cc4a4ed6673df7c1d5 /rpc
parent8313d53accaa22feb14d284fb91245be0a32e16e (diff)
Revert "rpc: Fix the race between notification and reconnection"
This reverts commit a6b63e11b7758cf1bfcb67985e25ec02845f0995. Nithya and Rajesh found that the mount fails sometimes after this patch was merged so reverting it. BUG: 1386626 Change-Id: I959a5b6c7da61368cf4c67c98193c6e8fdd1755d Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/15838 Reviewed-by: N Balachandran <nbalacha@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'rpc')
-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);