[SSI] openssi/kernel/cluster/ssi/vproc rproc_cli_pproc.c, 1.31, 1.32

Roger Tsang <[email protected]> Mon, 17 Jan 2011 06:58:51 +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-serv514/cluster/ssi/vproc

Modified Files:
      Tag: OPENSSI-FC
	rproc_cli_pproc.c 
Log Message:
reopen_load_msg: move optype test out of for-loop. reduce work.


Index: rproc_cli_pproc.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/vproc/rproc_cli_pproc.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- rproc_cli_pproc.c	15 Dec 2010 07:11:02 -0000	1.31
+++ rproc_cli_pproc.c	17 Jan 2011 06:58:49 -0000	1.32
@@ -357,13 +357,19 @@
 	struct reopendata *rdp;
 	fd_data *fddp;
 	struct files_struct *files = current->files;
-	struct file *file;
-	int reop_flag = 0;
 	unsigned int fd;
+	int reop_flag = 0;
 	int error;
 
 	*rdpp = NULL;
 
+	if (RVP_ISRFORK(optype))
+		reop_flag = REOP_RFORK;
+	else if (optype == RVP_REXEC || RVP_ISMIGRATE(optype))
+		reop_flag = REOP_REXEC_MIG;
+	else
+		panic("reopen_load_msg: unknown optype");
+
 	rdp = kmalloc(sizeof(*rdp), GFP_KERNEL);
 	if (!rdp) {
 		error = -ENOMEM;
@@ -416,15 +422,6 @@
 		if (!FD_ISSET(fd, files->open_fds))
 			continue;
 
-		file = files->fd[fd];
-
-		if (RVP_ISRFORK(optype))
-			reop_flag = REOP_RFORK;
-		else if (optype == RVP_REXEC || RVP_ISMIGRATE(optype))
-			reop_flag = REOP_REXEC_MIG;
-		else
-			panic("reopen_load_msg: unknown optype");
-
 		/*
 		 * Prepare the the open file descriptor for export.
 		 *
@@ -432,7 +429,8 @@
 		 *	 currently reop_export_file() doesn't use
 		 *	 the tonode value.
 		 */
-		error = reop_export_file(file, reop_flag, &fddp->fbdatap);
+		error = reop_export_file(files->fd[fd],
+					reop_flag, &fddp->fbdatap);
 		if (error)
 			break;
 
@@ -443,7 +441,6 @@
 		printk("reopen_load_msg:\n");
 		print_fddata(fddp);
 #endif
-
 		fddp++;
 	}
 


------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl