From 4e601546388e2e2968eed3b96b1ff19c4e421c31 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Wed, 17 Oct 2018 10:33:44 +0200 Subject: fs: implement d_revalidate d_revalidate is useful when filesystems change under the hood of the fs layer. This can happen with network filesystems or with devfs. Signed-off-by: Sascha Hauer --- include/linux/dcache.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/linux/dcache.h') diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 16244129bf..1581ddc701 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h @@ -82,6 +82,7 @@ struct dentry { }; struct dentry_operations { + int (*d_revalidate)(struct dentry *, unsigned int); }; struct dentry * d_make_root(struct inode *); @@ -93,6 +94,8 @@ void d_delete(struct dentry *); struct dentry *dget(struct dentry *); void dput(struct dentry *); +#define DCACHE_OP_REVALIDATE 0x00000004 + #define DCACHE_ENTRY_TYPE 0x00700000 #define DCACHE_MISS_TYPE 0x00000000 /* Negative dentry (maybe fallthru to nowhere) */ #define DCACHE_WHITEOUT_TYPE 0x00100000 /* Whiteout dentry (stop pathwalk) */ -- cgit v1.2.3