[SSI] openssi/kernel/cluster/ssi/vproc rproc_svr_pproc.c, 1.35, 1.36

Roger Tsang <[email protected]> Tue, 05 Jul 2011 22:12:38 +0000
Newsgroups gmane.linux.cluster.ssic.cvs
Message-ID <[email protected]>
Update of /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/vproc
In directory vz-cvs-3.sog:/tmp/cvs-serv5790/cluster/ssi/vproc

Modified Files:
      Tag: OPENSSI-FC
	rproc_svr_pproc.c 
Log Message:
reopen_unload_msg: fix wrong fdnum in debug level kernel message.


Index: rproc_svr_pproc.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/vproc/rproc_svr_pproc.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- rproc_svr_pproc.c	17 Jan 2011 06:59:22 -0000	1.35
+++ rproc_svr_pproc.c	5 Jul 2011 22:12:36 -0000	1.36
@@ -230,7 +230,7 @@
 	/* NB: fdnum's are sorted. see reopen_load_msg() */
 	fd = fddp[rdp->fd_count-1].fdnum;
 
-	if (fd >= current->signal->rlim[RLIMIT_NOFILE].rlim_cur) {
+	if (unlikely(fd >= current->signal->rlim[RLIMIT_NOFILE].rlim_cur)) {
 		printk(KERN_ERR "reopen_unload_msg: "
 				"fd exceeds process limits\n");
 		error = -EINVAL;
@@ -246,9 +246,10 @@
 
 	for (idx = 0 ; idx < rdp->fd_count; idx++, fddp++) {
 		error = reop_import_file(fddp->fbdatap, &file);
-		if (error) {
+		if (unlikely(error)) {
 			printk(KERN_DEBUG "%s: reop_import_file fd=%d"
-				" error=%d\n", __FUNCTION__, fd, error);
+				" error=%d\n", __FUNCTION__,
+				fddp->fdnum, error);
 			goto out;
 		}
 		SSI_ASSERT(file);
@@ -264,7 +265,7 @@
 		flags = (fddp->fbdatap->flags & ~O_NOOPEN) ^ file->f_flags;
 		if (flags) {
 			error = (int)do_fcntl(fd, F_SETFL, flags, file);
-			if (error < 0) {
+			if (unlikely(error < 0)) {
 				printk(KERN_DEBUG "%s: do_fcntl fd=%d flags=%u"
 					" error=%d\n", __FUNCTION__,
 					fd, flags, error);


------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2