diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2020-03-17 15:04:22 +0100 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2020-03-17 15:04:22 +0100 |
commit | f428884456192230ba1573e4028fb9282ffa2bb7 (patch) | |
tree | bf4c8ad98aaecb0ad80dc6d43f6a10ea005d67be /fs/overlayfs/export.c | |
parent | 7925dad839e70ab43140e26d6b93e807b5969f05 (diff) | |
download | lwn-f428884456192230ba1573e4028fb9282ffa2bb7.tar.gz lwn-f428884456192230ba1573e4028fb9282ffa2bb7.zip |
ovl: decide if revalidate needed on a per-dentry basis
Allow completely skipping ->revalidate() on a per-dentry basis, in case the
underlying layers used for a dentry do not themselves have ->revalidate().
E.g. negative overlay dentry has no underlying layers, hence revalidate is
unnecessary. Or if lower layer is remote but overlay dentry is pure-upper,
then can skip revalidate.
The following places need to update whether the dentry needs revalidate or
not:
- fill-super (root dentry)
- lookup
- create
- fh_to_dentry
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/overlayfs/export.c')
-rw-r--r-- | fs/overlayfs/export.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/overlayfs/export.c b/fs/overlayfs/export.c index 6f54d70cef27..a58b3d9b06b9 100644 --- a/fs/overlayfs/export.c +++ b/fs/overlayfs/export.c @@ -324,6 +324,8 @@ static struct dentry *ovl_obtain_alias(struct super_block *sb, if (upper_alias) ovl_dentry_set_upper_alias(dentry); } + ovl_dentry_update_reval(dentry, upper, + DCACHE_OP_REVALIDATE | DCACHE_OP_WEAK_REVALIDATE); return d_instantiate_anon(dentry, inode); |