[SSI] openssi/kernel/cluster/ssi/cfs read.c,1.26,1.27

Roger Tsang <[email protected]> Sun, 02 Oct 2011 22:20:38 +0000
Newsgroups gmane.linux.cluster.ssic.cvs
Message-ID <[email protected]>
Update of /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/cfs
In directory vz-cvs-3.sog:/tmp/cvs-serv5295/cluster/ssi/cfs

Modified Files:
      Tag: OPENSSI-FC
	read.c 
Log Message:
cfs_readdata_free: no need to test for NULL element in pagevec array since cfs_read_rpcsetup() already did the test. (#ifdef CFS_PAGEVEC)


Index: read.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/cfs/read.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- read.c	17 Jan 2011 06:40:07 -0000	1.26
+++ read.c	2 Oct 2011 22:20:36 -0000	1.27
@@ -110,12 +110,12 @@
 {
 #ifdef CFS_PAGEVEC
 #ifdef CFS_ASYNC_LOCAL_SYNC
-	while (p->is_local && p->npages--) {
-		if (p->pagevec[p->npages])
+	if (p->is_local) {
+		while (p->npages--)
 			__free_page(p->pagevec[p->npages]);
 	}
 #endif
-	if (p && (p->pagevec != &p->page_array[0]))
+	if (p->pagevec != &p->page_array[0])
 		kfree(p->pagevec);
 #endif
 	iput(p->inode);
@@ -381,6 +381,7 @@
 	if (data->is_local) {
 		struct cfs_page *cp;
 		/* Unset is_local, do zero-copy if page cache is not virtual */
+		data->is_local = 0;
 		list_for_each_entry(cp, head, wb_list) {
 			if (PageHighMem(cp->wb_page)) {
 				data->is_local = -1;
@@ -398,8 +399,7 @@
 				cfs_readdata_free(data);
 				return -ENOMEM;
 			}
-		} else
-			data->is_local = 0;
+		}
 	}
 #else
 	/* N.B. Do we need to test? Never called for swapfile inode */


------------------------------------------------------------------------------
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-d2dcopy2