Skip to content

Commit

Permalink
ovl: use d_splice_alias() in place of d_add() in lookup
Browse files Browse the repository at this point in the history
This is required for NFS export.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
  • Loading branch information
Amir Goldstein authored and Miklos Szeredi committed Jan 24, 2018
1 parent 0aceb53 commit 829c28b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions fs/overlayfs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 829c28b

Please sign in to comment.