From 72ce732fa5c9979ea6352ea98451471b721410c1 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Fri, 11 Nov 2016 11:48:51 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/15825 Reviewed-by: Raghavendra Talur Smoke: Gluster Build System NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System --- rpc/rpc-lib/src/rpc-clnt.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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