diff options
-rw-r--r-- | fs/fs.c | 9 | ||||
-rw-r--r-- | include/linux/dcache.h | 2 |
2 files changed, 11 insertions, 0 deletions
@@ -1262,6 +1262,15 @@ static void d_invalidate(struct dentry *dentry) { } +static int d_no_revalidate(struct dentry *dir, unsigned int flags) +{ + return 0; +} + +const struct dentry_operations no_revalidate_d_ops = { + .d_revalidate = d_no_revalidate, +}; + static inline int d_revalidate(struct dentry *dentry, unsigned int flags) { if (unlikely(dentry->d_flags & DCACHE_OP_REVALIDATE)) diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 1581ddc701..a961942201 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h @@ -185,4 +185,6 @@ static inline struct inode *d_inode(const struct dentry *dentry) char *dpath(struct dentry *dentry, struct dentry *root); +extern const struct dentry_operations no_revalidate_d_ops; + #endif /* __LINUX_DCACHE_H */ |