[patch 34/56] openmosix/openmosix-alloc_fd_bitmap-spinlock-protection.patch

Florian Delizy <[email protected]> Thu, 02 Nov 2006 22:56:51 +0100
Newsgroups gmane.linux.cluster.openmosix.devel
Message-ID <[email protected]>
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

_______________________________________________
openMosix-devel mailing list
openMosix-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/openmosix-devel
openmosix-alloc_fd_bitmap-spinlock-protection.patch (text/x-patch, 572 B)
Index: linux/hpc/kcom.c
===================================================================
--- linux.orig/hpc/kcom.c	2006-11-02 22:51:58.000000000 +0100
+++ linux/hpc/kcom.c	2006-11-02 22:52:23.000000000 +0100
@@ -143,10 +143,10 @@
 		return 0;
 
 	n = max(fd,max(fd4, fd6));
-	// spin_lock(&kcom_nodes_lock);
-	list_for_each_entry(node, &kcom_nodes, list)
-		n = max(node->fd, n);
-	// spin_unlock(&kcom_nodes_lock);
+
+	read_lock(&kcom_nodes_lock);
+	list_for_each_entry(node, &kcom_nodes, list) n = max(node->fd, n);
+	read_unlock(&kcom_nodes_lock);
 
 
 	maxfds = n;