[Ocfs2-commits] mfasheh commits r1983 - trunk/fs/ocfs2/cluster

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Tue Mar 15 23:53:41 CST 2005


Author: mfasheh
Signed-off-by: zab
Date: 2005-03-15 23:53:39 -0600 (Tue, 15 Mar 2005)
New Revision: 1983

Modified:
   trunk/fs/ocfs2/cluster/tcp.c
Log:
* only destroy the socket in net_send_message on network errors

Signed-off-by: zab



Modified: trunk/fs/ocfs2/cluster/tcp.c
===================================================================
--- trunk/fs/ocfs2/cluster/tcp.c	2005-03-16 05:49:59 UTC (rev 1982)
+++ trunk/fs/ocfs2/cluster/tcp.c	2005-03-16 05:53:39 UTC (rev 1983)
@@ -618,6 +618,7 @@
 {
 	int ret;
 	int cleanup_wq = 0;
+	int cleanup_sock = 1;
 	net_msg *msg = NULL;
 	net_status_ctxt nsc;
 	wait_queue_t sleep;
@@ -724,11 +725,14 @@
 	netprintk("woken, returning system status %d, user status %d",
 		  ret, nsc.status);
 
+	/* At this point only destroy the socket if the other node died. */
+	if (ret != -EHOSTDOWN)
+		cleanup_sock = 0;
 out:
 	if (cleanup_wq)
 		remove_wait_queue(&nsc.wq, &sleep);
 	if (sock)
-		net_sock_decref(inode, ret);
+		net_sock_decref(inode, cleanup_sock);
 	if (iov)
 		kfree(iov);
 	if (msg)



More information about the Ocfs2-commits mailing list