[Ocfs2-commits] mfasheh commits r1415 - trunk/src

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Thu Sep 2 13:45:52 CDT 2004


Author: mfasheh
Date: 2004-09-02 13:45:50 -0500 (Thu, 02 Sep 2004)
New Revision: 1415

Modified:
   trunk/src/dcache.c
Log:
* fail dentry revalidate for orphaned directories.



Modified: trunk/src/dcache.c
===================================================================
--- trunk/src/dcache.c	2004-09-01 21:57:44 UTC (rev 1414)
+++ trunk/src/dcache.c	2004-09-02 18:45:50 UTC (rev 1415)
@@ -82,6 +82,14 @@
 		goto bail;
 	}
 
+#warning "should we do this for all files?"
+	if (S_ISDIR(inode->i_mode) && (!inode->i_nlink)) {
+		LOG_TRACE_ARGS("dentry_revalidate: dir inode (%llu) orphaned, "
+			       "returning false\n",
+			       OCFS_I(inode)->ip_blkno);
+		goto bail;
+	}
+
 	if (ocfs_node_map_is_only(osb, &osb->publ_map, osb->node_num)) {
 		LOG_TRACE_STR ("Only node alive.  revalidate=true.");
 		ret = 1;



More information about the Ocfs2-commits mailing list