[SSI] openssi/kernel/cluster/ssi/vproc nsc_initproc.c,1.25,1.26

Roger Tsang <[email protected]> Wed, 15 Dec 2010 07:40:17 +0000
Newsgroups gmane.linux.cluster.ssic.cvs
Message-ID <[email protected]>
Update of /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/vproc
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv20233/kernel/cluster/ssi/vproc

Modified Files:
      Tag: OPENSSI-FC
	nsc_initproc.c 
Log Message:
initproc_postroot_init: reduce number of sys_close() calls.


Index: nsc_initproc.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/vproc/nsc_initproc.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- nsc_initproc.c	2 Feb 2010 04:32:42 -0000	1.25
+++ nsc_initproc.c	15 Dec 2010 07:40:15 -0000	1.26
@@ -92,8 +92,11 @@
 	 */
 	daemonize("child_reaper");
 	set_fs(KERNEL_DS);
-	for (fd = 0; fd < tsk->files->max_fds; fd++)
+	for (fd = 0; fd < tsk->files->max_fds; fd++) {
+		if (!FD_ISSET(fd, tsk->files->open_fds))
+			continue;
 		(void)sys_close(fd);
+	}
 	if (init_node == this_node) {
 
 		/* On the init node, we call this first to transition to


------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d