summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTingmao Wang <m@maowtm.org>2025-04-06 17:18:43 +0100
committerDominique Martinet <asmadeus@codewreck.org>2025-08-23 15:34:46 +0900
commit0172a934747f21d2fca4870ec84518c97f5178fc (patch)
treefc0f670102ab40b042999274158db2cc81e1f573
parent290434474c332a2ba9c8499fe699c7f2e1153280 (diff)
fs/9p: Invalidate dentry if inode type change detected in cached mode
This is an extension of the last commit to cached mode as well. While server-side changes when using cached mode is not expected, when it does happen we can get things like -EOPNOTSUPP. With this change at least when we realize the inode has updated (for example after a `touch` on the client), we can get a new one. Signed-off-by: Tingmao Wang <m@maowtm.org> Message-ID: <01afd3c77d5cda181780dc931baa8f3fc54562c8.1743956147.git.m@maowtm.org> Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
-rw-r--r--fs/9p/vfs_dentry.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/9p/vfs_dentry.c b/fs/9p/vfs_dentry.c
index ffa45ee38f83..ddf7424b5850 100644
--- a/fs/9p/vfs_dentry.c
+++ b/fs/9p/vfs_dentry.c
@@ -97,7 +97,7 @@ static int __v9fs_lookup_revalidate(struct dentry *dentry, unsigned int flags)
if (retval == -ENOENT)
return 0;
- if (!cached && v9inode->cache_validity & V9FS_INO_INVALID_ATTR)
+ if (v9inode->cache_validity & V9FS_INO_INVALID_ATTR)
return 0;
if (retval < 0)
return retval;