d_splice bugfix: update dentry in our lookup if needed.
authorErez_Zadok <ezk@cs.sunysb.edu>
Sun, 20 May 2007 00:44:25 +0000 (20:44 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Tue, 11 Nov 2014 02:33:00 +0000 (21:33 -0500)
fs/unionfs/inode.c

index d3e0a4f1ba3ccbe9f5befbb723f28998605e1e98..fcdd7398191e8d4c94353897323cc3b3869428b6 100644 (file)
@@ -266,8 +266,11 @@ static struct dentry *unionfs_lookup(struct inode *parent,
                nd->dentry = path_save.dentry;
                nd->mnt = path_save.mnt;
        }
-       if (!IS_ERR(ret))
+       if (!IS_ERR(ret)) {
+               if (ret)
+                       dentry = ret;
                unionfs_inherit_mnt(dentry);
+       }
 
        unionfs_check_inode(parent);
        unionfs_check_dentry(dentry);