summaryrefslogtreecommitdiff
path: root/fs/overlayfs/namei.c
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@redhat.com>2017-07-04 23:03:16 +0300
committerMiklos Szeredi <mszeredi@redhat.com>2017-07-04 23:03:16 +0300
commit09d8b586731bf589655c2ac971532c14cf272b63 (patch)
tree5acbbdb16f462e772083c847e54f82ef68c9727f /fs/overlayfs/namei.c
parent9020df37207867272e590a416c2fb3da0e5383c6 (diff)
downloadlinux-09d8b586731bf589655c2ac971532c14cf272b63.tar.xz
ovl: move __upperdentry to ovl_inode
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/overlayfs/namei.c')
-rw-r--r--fs/overlayfs/namei.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/overlayfs/namei.c b/fs/overlayfs/namei.c
index 0072ca5d5dac..1f873e2e8a79 100644
--- a/fs/overlayfs/namei.c
+++ b/fs/overlayfs/namei.c
@@ -359,7 +359,7 @@ struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry,
return ERR_PTR(-ENAMETOOLONG);
old_cred = ovl_override_creds(dentry->d_sb);
- upperdir = ovl_upperdentry_dereference(poe);
+ upperdir = ovl_dentry_upper(dentry->d_parent);
if (upperdir) {
err = ovl_lookup_layer(upperdir, &d, &upperdentry);
if (err)
@@ -436,13 +436,12 @@ struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry,
oe->opaque = upperopaque;
oe->impure = upperimpure;
oe->redirect = upperredirect;
- oe->__upperdentry = upperdentry;
memcpy(oe->lowerstack, stack, sizeof(struct path) * ctr);
dentry->d_fsdata = oe;
if (upperdentry || ctr) {
err = -ENOMEM;
- inode = ovl_get_inode(dentry);
+ inode = ovl_get_inode(dentry, upperdentry);
if (!inode)
goto out_free_oe;
}
@@ -487,7 +486,7 @@ bool ovl_lower_positive(struct dentry *dentry)
return oe->opaque;
/* Negative upper -> positive lower */
- if (!oe->__upperdentry)
+ if (!ovl_dentry_upper(dentry))
return true;
/* Positive upper -> have to look up lower to see whether it exists */