diff --git a/fs/fs.c b/fs/fs.c index c6cb499..dda19db 100644 --- a/fs/fs.c +++ b/fs/fs.c @@ -1262,6 +1262,15 @@ { } +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/fs/tftp.c b/fs/tftp.c index 4329327..1f36c56 100644 --- a/fs/tftp.c +++ b/fs/tftp.c @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include @@ -716,6 +715,7 @@ } sb->s_op = &tftp_ops; + sb->s_d_op = &no_revalidate_d_ops; inode = tftp_get_inode(sb, NULL, S_IFDIR); sb->s_root = d_make_root(inode); diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 1581ddc..a961942 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h @@ -185,4 +185,6 @@ char *dpath(struct dentry *dentry, struct dentry *root); +extern const struct dentry_operations no_revalidate_d_ops; + #endif /* __LINUX_DCACHE_H */