commit b6e7ce613fc06b825f3e9d5b1c9fb1a4274aab4c
Author: Erez Zadok <[email protected]>
Date:   Wed Sep 23 01:26:13 2009 -0400

    Unionfs: don't leak an inode in hardlinks
    
    Set the hardlink'ed inode to the same one as the linked one, instead of
    instantiating a new inode.
    
    Signed-off-by: Erez Zadok <[email protected]>

diff --git a/fs/unionfs/inode.c b/fs/unionfs/inode.c
index 118e2c8..eaac155 100644
--- a/fs/unionfs/inode.c
+++ b/fs/unionfs/inode.c
@@ -318,7 +318,7 @@ check_link:
 
        /* Its a hard link, so use the same inode */
        new_dentry->d_inode = igrab(old_dentry->d_inode);
-       d_instantiate(new_dentry, new_dentry->d_inode);
+       d_add(new_dentry, new_dentry->d_inode);
        unionfs_copy_attr_all(dir, lower_new_dentry->d_parent->d_inode);
        fsstack_copy_inode_size(dir, lower_new_dentry->d_parent->d_inode);
 
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs

Reply via email to