commit 85c337669e2ebe82e0842781175573c1b2a45427
Author: Yiannis Pericleous <[EMAIL PROTECTED]>
Date:   Sun May 20 15:29:37 2007 -0400

    fixed opaque dirs invariancy issue

diff --git a/fs/unionfs/lookup.c b/fs/unionfs/lookup.c
index b089898..c571ee4 100644
--- a/fs/unionfs/lookup.c
+++ b/fs/unionfs/lookup.c
@@ -296,6 +296,23 @@ out_positive:
                        err = -ENOENT;
                        goto out_drop;
                }
+
+               /* if the dentry is an opaque dir we must release everything 
after the opaqueness branch */
+               else if (S_ISDIR(dentry->d_inode->i_mode) &&
+                               odf_get_opaque(dentry->d_sb, dentry) != -1) {
+                       for (bindex = dbend(dentry) + 1; bindex < 
sbmax(dentry->d_sb); bindex++) {
+                               if (unionfs_lower_dentry_idx(dentry, bindex))
+                                       dput(unionfs_lower_dentry_idx(dentry, 
bindex));
+                               unionfs_set_lower_dentry_idx(dentry, bindex, 
NULL);
+                               if (unionfs_lower_mnt_idx(dentry, bindex))
+                                       unionfs_mntput(dentry, bindex);
+                               unionfs_set_lower_mnt_idx(dentry, bindex, NULL);
+                               if(unionfs_lower_inode_idx(dentry->d_inode, 
bindex))
+                                       
iput(unionfs_lower_inode_idx(dentry->d_inode, bindex));
+                               unionfs_set_lower_inode_idx(dentry->d_inode, 
bindex, NULL);
+                                       
+                       }
+               }
        }
 
        goto out;
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs

Reply via email to