summaryrefslogtreecommitdiffstats
path: root/fs/overlayfs/util.c
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@redhat.com>2020-03-17 15:04:22 +0100
committerMiklos Szeredi <mszeredi@redhat.com>2020-03-17 15:04:22 +0100
commitbccece1ead368149f90e05ad104dfbfda4422f5d (patch)
treed0d4524ba18318785ff354864f5a6aff753d59dd /fs/overlayfs/util.c
parentf428884456192230ba1573e4028fb9282ffa2bb7 (diff)
downloadlinux-bccece1ead368149f90e05ad104dfbfda4422f5d.tar.bz2
ovl: allow remote upper
No reason to prevent upper layer being a remote filesystem. Do the revalidation in that case, just as we already do for lower layers. This lets virtiofs be used as upper layer, which appears to be a real use case. Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/overlayfs/util.c')
-rw-r--r--fs/overlayfs/util.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/overlayfs/util.c b/fs/overlayfs/util.c
index 1cd805ba1eeb..36b60788ee47 100644
--- a/fs/overlayfs/util.c
+++ b/fs/overlayfs/util.c
@@ -102,6 +102,8 @@ void ovl_dentry_update_reval(struct dentry *dentry, struct dentry *upperdentry,
struct ovl_entry *oe = OVL_E(dentry);
unsigned int i, flags = 0;
+ if (upperdentry)
+ flags |= upperdentry->d_flags;
for (i = 0; i < oe->numlower; i++)
flags |= oe->lowerstack[i].dentry->d_flags;