[SSI] openssi/kernel/cluster/ssi/cfs dir.c,1.36,1.37

Roger Tsang <[email protected]> Tue, 05 Jul 2011 22:02:26 +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-serv3720/cluster/ssi/cfs

Modified Files:
      Tag: OPENSSI-FC
	dir.c 
Log Message:
cfs_lookup: Fix BUG_ON(!d_unhashed(alias)) in d_instantiate_unique() when backing filesystem dentries are not unique. There was a second matching entry in the parent dentry hash table but d_lookup() only tries the first match. We use d_splice_alias() since CFS may be exported by knfsd.


Index: dir.c
===================================================================
RCS file: /cvsroot/ssic-linux/openssi/kernel/cluster/ssi/cfs/dir.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- dir.c	15 Dec 2010 08:08:07 -0000	1.36
+++ dir.c	5 Jul 2011 22:02:24 -0000	1.37
@@ -1052,7 +1052,12 @@
 #ifdef SSI_EXNFS_XXX
 no_entry:
 #endif
-		res = d_add_unique(dentry, inode);
+		/* SSI: we avoid d_add_unique() here because not all backing
+		 * filesystem dentries are unique. Our caller already
+		 * tried d_lookup() but there could be multiple matching
+		 * entries in the parent dentry hash table.
+		 */
+		res = d_splice_alias(inode, dentry);
 		if (res != NULL)
 			dentry = res;
 


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