[SSI] openssi/kernel/cluster/ssi/cfs inode.c,1.66,1.67

Roger Tsang <[email protected]> Mon, 25 Oct 2010 05:26:49 +0000
Newsgroups gmane.linux.cluster.ssic.cvs
Message-ID <[email protected]>
Update of /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/cfs
In directory sfp-cvsdas-3.v30.ch3.sourceforge.com:/tmp/cvs-serv7581/cluster/ssi/cfs

Modified Files:
      Tag: OPENSSI-FC
	inode.c 
Log Message:
- Fix cfs_find_actor() might sleep in wait_on_new_inode() while caller holds inode_lock spin lock. wait_on_new_inode() is not required for linux-2.6.11 iget5_locked().


Index: inode.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/cfs/inode.c,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -d -r1.66 -r1.67
--- inode.c	2 Apr 2010 20:53:20 -0000	1.66
+++ inode.c	25 Oct 2010 05:26:47 -0000	1.67
@@ -61,6 +61,7 @@
 #include <cluster/async.h>
 #include <linux/lockd/bind.h>
 #include <linux/smp_lock.h>
+#include <linux/version.h>
 
 #ifdef CONFIG_VPROC
 #include <cluster/gen/reopen.h>
@@ -596,6 +597,7 @@
 		cfs_refresh_inode(inode, fattr);
 }
 
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,11)
 static void __wait_on_new_inode(struct inode *inode)
 {
 	DECLARE_WAITQUEUE(wait, current);
@@ -617,6 +619,7 @@
 	if (inode->i_state & I_NEW)
 		__wait_on_new_inode(inode);
 }
+#endif /* LINUX_VERSION_CODE > KERNEL_VERSION(2,6,11) */
 
 /* Called from base with inode_lock spin locked */
 int
@@ -624,7 +627,9 @@
 {
 	struct cfs_find_desc	*desc = (struct cfs_find_desc *)opaque;
 
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,11)
 	wait_on_new_inode(inode);
+#endif
 	if (desc->cdrok) {
 		if (inode->i_ino != desc->cdrok->cdrok_attr.cna_ino)
 			return 0;


------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev