From 922af37e33acb59c6f8beca40a9314593b484d1a Mon Sep 17 00:00:00 2001 From: Pranith Kumar Karampuri Date: Sun, 13 Nov 2016 06:53:15 -0700 Subject: 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 Reviewed-on: http://review.gluster.org/15838 Reviewed-by: N Balachandran NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Smoke: Gluster Build System --- rpc/rpc-lib/src/rpc-clnt.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'rpc/rpc-lib') diff --git a/rpc/rpc-lib/src/rpc-clnt.c b/rpc/rpc-lib/src/rpc-clnt.c index 3caab985cfe..e8a8ea2ecd9 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); -- cgit