GIT: unionfs2-2.6.27.y: Unionfs: properly hash newly created inodes
Erez Zadok
ezk at fsl.cs.sunysb.edu
Thu Aug 12 23:18:05 EDT 2010
commit b9e570448bca0ac1b9d0821750974c4803cd0a5e
Author: Erez Zadok <ezk at cs.sunysb.edu>
Date: Mon Jul 28 00:25:46 2008 -0400
Unionfs: properly hash newly created inodes
This fixes LTP's syscalls/rename13 test.
Signed-off-by: Erez Zadok <ezk at cs.sunysb.edu>
diff --git a/fs/unionfs/inode.c b/fs/unionfs/inode.c
index fa3c518..a05b412 100644
--- a/fs/unionfs/inode.c
+++ b/fs/unionfs/inode.c
@@ -339,7 +339,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);
diff --git a/fs/unionfs/main.c b/fs/unionfs/main.c
index 0cdd50b..fea670b 100644
--- a/fs/unionfs/main.c
+++ b/fs/unionfs/main.c
@@ -128,6 +128,9 @@ skip:
/* only (our) lookup wants to do a d_add */
switch (flag) {
case INTERPOSE_DEFAULT:
+ /* for operations which create new inodes */
+ d_add(dentry, inode);
+ break;
case INTERPOSE_REVAL_NEG:
d_instantiate(dentry, inode);
break;
More information about the unionfs-cvs
mailing list