This is less important patch, to speed up check_empty().
It returns asap on the basis of the nlink of an empty dir is 2, and
count-up his parent dir's nlink.
I am not sure there is a filesystem doen't follow such basis.
Junjiro Okajima
--- unionfs-20050929-0844/dirhelper.cO 2005-09-29 21:44:03.000000000 +0900
+++ unionfs-20050929-0844/dirhelper.c 2005-10-02 18:17:42.000000000 +0900
@@ -177,6 +177,17 @@
ASSERT(S_ISDIR(dentry->d_inode->i_mode));
+#if 1
+ /*
+ * in almost all filesystems, a dir count-up his parent dir's nlink.
+ */
+ if (dentry->d_inode->i_nlink > 2) {
+ /* one or more child dir */
+ err = -ENOTEMPTY;
+ goto out;
+ }
+#endif
+
if ((err = unionfs_partial_lookup(dentry)))
goto out;
_______________________________________________
unionfs mailing list
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs