summaryrefslogtreecommitdiff
path: root/fs/overlayfs
diff options
context:
space:
mode:
authorAmir Goldstein <amir73il@gmail.com>2017-09-29 21:43:07 +0300
committerMiklos Szeredi <mszeredi@redhat.com>2018-01-24 13:25:57 +0300
commit829c28be9bb9a05aa7eeb8a68a4536cca2d3d694 (patch)
treec705c94b0b20ccf2d58f1840777879348ada4319 /fs/overlayfs
parent0aceb53e73befee4441c9e68d23cb4f682382171 (diff)
downloadlinux-829c28be9bb9a05aa7eeb8a68a4536cca2d3d694.tar.xz
ovl: use d_splice_alias() in place of d_add() in lookup
This is required for NFS export. Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/overlayfs')
-rw-r--r--fs/overlayfs/namei.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/overlayfs/namei.c b/fs/overlayfs/namei.c
index d69ea0a385f6..9d3ccbd95dde 100644
--- a/fs/overlayfs/namei.c
+++ b/fs/overlayfs/namei.c
@@ -982,9 +982,7 @@ struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry,
dput(index);
kfree(stack);
kfree(d.redirect);
- d_add(dentry, inode);
-
- return NULL;
+ return d_splice_alias(inode, dentry);
out_free_oe:
dentry->d_fsdata = NULL;