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

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Fri Aug 27 18:18:28 CDT 2004


Author: mfasheh
Date: 2004-08-27 18:18:26 -0500 (Fri, 27 Aug 2004)
New Revision: 1394

Modified:
   trunk/src/nm.c
Log:
* fix a bug where we were responding yes to delete requests on
  directories which were still busy on our node. This would result in
  the inode being removed from the file system but we'd still have a
  memory inode around, just waiting for someone to send us a vote on...



Modified: trunk/src/nm.c
===================================================================
--- trunk/src/nm.c	2004-08-27 23:15:18 UTC (rev 1393)
+++ trunk/src/nm.c	2004-08-27 23:18:26 UTC (rev 1394)
@@ -607,6 +607,18 @@
 	}
 	spin_unlock(&oin_num_ext_lock);
 
+	/* directories are a bit ugly... What if someone is sitting in
+	 * it? We want to make sure the inode is removed completely as
+	 * a result of the iput in process_vote. */
+	if (S_ISDIR(inode->i_mode) && (atomic_read(&inode->i_count) != 1)) {
+#ifdef VERBOSE_PROCESS_VOTE
+		printk("process_vote: (delete) i_count = %u\n", 
+		       atomic_read(&inode->i_count));
+#endif
+		status = 0;
+		goto done;
+	}
+
 	status = 1;
 done:
 	return(status);



More information about the Ocfs2-commits mailing list