diff options
-rw-r--r-- | fs/overlayfs/namei.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/overlayfs/namei.c b/fs/overlayfs/namei.c index c5449efd96d5..de3e6da1d5a5 100644 --- a/fs/overlayfs/namei.c +++ b/fs/overlayfs/namei.c @@ -976,6 +976,8 @@ struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry, upperdentry = dget(index); if (upperdentry || ctr) { + if (ctr) + origin = stack[0].dentry; inode = ovl_get_inode(dentry->d_sb, upperdentry, origin, index, ctr); err = PTR_ERR(inode); |