diff options
author | Mark Brown <broonie@kernel.org> | 2016-03-21 17:08:52 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-03-21 17:08:52 +0000 |
commit | 5c1af2f870ab94f94f9dff231c6f18845e5a800a (patch) | |
tree | 9cebefa529103691eab8561449c00d43d6420b34 /fs/overlayfs/super.c | |
parent | c35983d487b56c023b70d6727ad002b19f935827 (diff) | |
parent | 917a9133a6b3c6cc2b6b5649d28c617a4ccac3e6 (diff) |
Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-rtlsk-v4.4-16.03-rt
Diffstat (limited to 'fs/overlayfs/super.c')
-rw-r--r-- | fs/overlayfs/super.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c index f42c9407fbad..000b2ed05c29 100644 --- a/fs/overlayfs/super.c +++ b/fs/overlayfs/super.c @@ -76,12 +76,14 @@ enum ovl_path_type ovl_path_type(struct dentry *dentry) if (oe->__upperdentry) { type = __OVL_PATH_UPPER; - if (oe->numlower) { - if (S_ISDIR(dentry->d_inode->i_mode)) - type |= __OVL_PATH_MERGE; - } else if (!oe->opaque) { + /* + * Non-dir dentry can hold lower dentry from previous + * location. Its purity depends only on opaque flag. + */ + if (oe->numlower && S_ISDIR(dentry->d_inode->i_mode)) + type |= __OVL_PATH_MERGE; + else if (!oe->opaque) type |= __OVL_PATH_PURE; - } } else { if (oe->numlower > 1) type |= __OVL_PATH_MERGE; @@ -322,6 +324,7 @@ static const struct dentry_operations ovl_dentry_operations = { static const struct dentry_operations ovl_reval_dentry_operations = { .d_release = ovl_dentry_release, + .d_select_inode = ovl_d_select_inode, .d_revalidate = ovl_dentry_revalidate, .d_weak_revalidate = ovl_dentry_weak_revalidate, }; |