[Ocfs2-commits] jlbec commits r2016 - trunk/fs/usysfs

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Sat Mar 19 16:08:56 CST 2005


Author: jlbec
Signed-off-by: wcoekaer
Date: 2005-03-19 16:08:54 -0600 (Sat, 19 Mar 2005)
New Revision: 2016

Modified:
   trunk/fs/usysfs/dir.c
Log:

o Add some comments about how we could do less VFS faking.

Signed-off-by: wcoekaer



Modified: trunk/fs/usysfs/dir.c
===================================================================
--- trunk/fs/usysfs/dir.c	2005-03-19 01:54:11 UTC (rev 2015)
+++ trunk/fs/usysfs/dir.c	2005-03-19 22:08:54 UTC (rev 2016)
@@ -406,6 +406,9 @@
  * This fakes mkdir(2) on a default_sets[] entry.  It
  * creates a dentry, instantiates it, and then does fixup
  * on the sd->s_type.
+ * 
+ * We could, perhaps, tweak our parent's ->mkdir for a minute and
+ * try using vfs_mkdir.  Just a thought.
  */
 static int create_default_set(struct kset *parent_kset,
 			      struct kset *kset)
@@ -450,7 +453,13 @@
 	int i;
 
 	if (ukset && ukset->default_sets) {
-		/* FYI, we're faking mkdir here */
+		/* FYI, we're faking mkdir here
+		 * I'm not sure we need this semaphore, as we're called
+		 * from our parent's mkdir.  That holds our parent's
+		 * i_sem, so afaik lookup cannot continue through our
+		 * parent to find us, let alone mess with our tree.
+		 * That said, taking our i_sem is closer to mkdir
+		 * emulation, and shouldn't hurt. */
 		down(&dentry->d_inode->i_sem);
 
 		for (i = 0; ukset->default_sets[i]; i++) {



More information about the Ocfs2-commits mailing list