[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] cluster/dlm-kernel/src lowcomms.c



CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL4
Changes by:	pcaulfield sourceware org	2007-08-13 20:07:11

Modified files:
	dlm-kernel/src : lowcomms.c 

Log message:
	Fix for bz#238490 (at least)
	Keep othercons hanging around until we shut down, but clear out the
	sock member so we know which ones are active.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/dlm-kernel/src/lowcomms.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.22.2.16&r2=1.22.2.17

--- cluster/dlm-kernel/src/Attic/lowcomms.c	2007/08/06 14:40:50	1.22.2.16
+++ cluster/dlm-kernel/src/Attic/lowcomms.c	2007/08/13 20:07:09	1.22.2.17
@@ -320,18 +320,9 @@
 		__free_page(con->rx_page);
 		con->rx_page = NULL;
 	}
-	/* If we are an 'othercon' then NULL the pointer to us
-	   from the parent and tidy ourself up */
-	if (test_bit(CF_IS_OTHERCON, &con->flags)) {
-		struct connection *parent = connections[con->nodeid];
-		parent->othercon = NULL;
-		kmem_cache_free(con_cache, con);
-	}
-	else {
-		/* Parent connections get reused */
-		con->retries = 0;
-		up_write(&con->sock_sem);
-	}
+
+	con->retries = 0;
+	up_write(&con->sock_sem);
 }
 
 /* Data received from remote end */
@@ -518,6 +509,8 @@
 			init_rwsem(&othercon->sock_sem);
 			set_bit(CF_IS_OTHERCON, &othercon->flags);
 			newcon->othercon = othercon;
+		}
+		if (!othercon->sock) {
 			othercon->sock = newsock;
 			newsock->sk->sk_user_data = othercon;
 			add_sock(newsock, othercon);
@@ -1215,6 +1208,8 @@
 		if (connections[i]) {
 			close_connection(connections[i], TRUE);
 			kmem_cache_free(con_cache, connections[i]);
+			if (connections[i]->othercon)
+				kmem_cache_free(con_cache, connections[i]->othercon);
 		}
 	}
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]