summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-lib/src/rpc-clnt.c
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2012-03-19 18:10:34 +0530
committerVijay Bellur <vijay@gluster.com>2012-03-19 09:14:40 -0700
commitd98c3e19342be3b8b3e2c7e3d7e544de34143bdf (patch)
treeba1d1d18d33694c99749dd005d0d46e91020e7e1 /rpc/rpc-lib/src/rpc-clnt.c
parent55c22fbfae259bff3b0e0cca192f709b74d8bee5 (diff)
rpc-clnt: separate out connection_cleanup() from destroy()v3.3.0qa30
noticed that there are possibilities where one would like to do a connection_cleanup() before destroying a RPC connection itself, also current code is such that, rpc_clnt_connection_cleanup() does rpc_clnt_ref() and unref(), creating a race window/double unref possibilities in the code. by separating out the functions, this race window/double fault can be prevented. Change-Id: I7ebd3392efa891232857b6db9108b0b19e40fc12 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 802403 Reviewed-on: http://review.gluster.com/2979 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'rpc/rpc-lib/src/rpc-clnt.c')
-rw-r--r--rpc/rpc-lib/src/rpc-clnt.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/rpc/rpc-lib/src/rpc-clnt.c b/rpc/rpc-lib/src/rpc-clnt.c
index 5867c322bd0..428a82b76aa 100644
--- a/rpc/rpc-lib/src/rpc-clnt.c
+++ b/rpc/rpc-lib/src/rpc-clnt.c
@@ -1573,7 +1573,6 @@ rpc_clnt_destroy (struct rpc_clnt *rpc)
rpc_transport_unref (rpc->conn.trans);
}
- rpc_clnt_connection_cleanup (&rpc->conn);
rpc_clnt_reconnect_cleanup (&rpc->conn);
saved_frames_destroy (rpc->conn.saved_frames);
pthread_mutex_destroy (&rpc->lock);