From: Erez Zadok Date: Sun, 27 Jul 2008 23:15:44 +0000 (-0400) Subject: Unionfs: properly hash newly created inodes X-Git-Tag: unionfs-2.4~1 X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=158ba0218b65b6e776251e6c5b4d1132946de161;p=unionfs-2.6.22.y.git Unionfs: properly hash newly created inodes This fixes LTP's syscalls/rename13 test. Signed-off-by: Erez Zadok --- diff --git a/fs/unionfs/inode.c b/fs/unionfs/inode.c index d9ca249c790..0173e27d56a 100644 --- a/fs/unionfs/inode.c +++ b/fs/unionfs/inode.c @@ -330,7 +330,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 12fd13e4d73..995875c4325 100644 --- a/fs/unionfs/main.c +++ b/fs/unionfs/main.c @@ -129,6 +129,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;