commit 50047d265eb843b4692f822b4f6808f27ce201e5
Author: Erez Zadok <[EMAIL PROTECTED]>
Date:   Sat Sep 20 01:33:46 2008 -0400

    Unionfs: remove obsolete lookup code for 2.6.9
    
    Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>

diff --git a/fs/unionfs/inode.c b/fs/unionfs/inode.c
index eef83b8..564ef34 100644
--- a/fs/unionfs/inode.c
+++ b/fs/unionfs/inode.c
@@ -203,8 +203,6 @@ static struct dentry *unionfs_lookup(struct inode *dir,
        unionfs_unlock_dentry(dentry); /* locked in new_dentry_private data */
 
 out:
-       if (!IS_ERR(ret) && d_unhashed(dentry)) /* needed in 2.6.9 */
-               d_rehash(dentry);
        unionfs_unlock_parent(dentry, parent);
        unionfs_read_unlock(dentry->d_sb);
 
diff --git a/fs/unionfs/rename.c b/fs/unionfs/rename.c
index 1dcff22..62ddf94 100644
--- a/fs/unionfs/rename.c
+++ b/fs/unionfs/rename.c
@@ -525,6 +525,13 @@ out:
        if (err)                /* clear the new_dentry stuff created */
                d_drop(new_dentry);
 
+       /*
+        * vfs_rename_other in 2.6.9 doesn't rehash the new_dentry, but
+        * vfs_rename_dir does.  So we have to fix it here.
+        */
+       if (!err && d_unhashed(new_dentry))     /* needed in 2.6.9 */
+               d_rehash(new_dentry);
+
        unionfs_double_unlock_dentry(old_dentry, new_dentry);
        if (new_parent != old_dentry &&
            new_parent != new_dentry &&
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs

Reply via email to