summaryrefslogtreecommitdiffstats
path: root/fs/overlayfs/namei.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-06-12 08:18:10 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-06-12 08:18:10 +0200
commit069a0f32c9ca75ec7f02146711ec1f5840a68cbf (patch)
tree0ee4fe0bdd706333192b26a0c43dda1481862bae /fs/overlayfs/namei.c
parentaca4e68acf3a08561f2a413322cbb232edad8764 (diff)
parent32c1431eea4881a6b17bd7c639315010aeefa452 (diff)
downloadop-kernel-dev-069a0f32c9ca75ec7f02146711ec1f5840a68cbf.zip
op-kernel-dev-069a0f32c9ca75ec7f02146711ec1f5840a68cbf.tar.gz
Merge 4.12-rc5 into char-misc-next
We want the char/misc driver fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/overlayfs/namei.c')
-rw-r--r--fs/overlayfs/namei.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/fs/overlayfs/namei.c b/fs/overlayfs/namei.c
index bad0f66..f3136c3 100644
--- a/fs/overlayfs/namei.c
+++ b/fs/overlayfs/namei.c
@@ -169,17 +169,7 @@ invalid:
static bool ovl_is_opaquedir(struct dentry *dentry)
{
- int res;
- char val;
-
- if (!d_is_dir(dentry))
- return false;
-
- res = vfs_getxattr(dentry, OVL_XATTR_OPAQUE, &val, 1);
- if (res == 1 && val == 'y')
- return true;
-
- return false;
+ return ovl_check_dir_xattr(dentry, OVL_XATTR_OPAQUE);
}
static int ovl_lookup_single(struct dentry *base, struct ovl_lookup_data *d,
@@ -351,6 +341,7 @@ struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry,
unsigned int ctr = 0;
struct inode *inode = NULL;
bool upperopaque = false;
+ bool upperimpure = false;
char *upperredirect = NULL;
struct dentry *this;
unsigned int i;
@@ -395,6 +386,8 @@ struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry,
poe = roe;
}
upperopaque = d.opaque;
+ if (upperdentry && d.is_dir)
+ upperimpure = ovl_is_impuredir(upperdentry);
}
if (!d.stop && poe->numlower) {
@@ -463,6 +456,7 @@ struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry,
revert_creds(old_cred);
oe->opaque = upperopaque;
+ oe->impure = upperimpure;
oe->redirect = upperredirect;
oe->__upperdentry = upperdentry;
memcpy(oe->lowerstack, stack, sizeof(struct path) * ctr);
OpenPOWER on IntegriCloud