Skip to content

Commit 0172a93

Browse files
micromaomaomartinetd
authored andcommitted
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 <[email protected]> Message-ID: <01afd3c77d5cda181780dc931baa8f3fc54562c8.1743956147.git.m@maowtm.org> Signed-off-by: Dominique Martinet <[email protected]>
1 parent 2904344 commit 0172a93

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

fs/9p/vfs_dentry.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ static int __v9fs_lookup_revalidate(struct dentry *dentry, unsigned int flags)
9797

9898
if (retval == -ENOENT)
9999
return 0;
100-
if (!cached && v9inode->cache_validity & V9FS_INO_INVALID_ATTR)
100+
if (v9inode->cache_validity & V9FS_INO_INVALID_ATTR)
101101
return 0;
102102
if (retval < 0)
103103
return retval;

0 commit comments

Comments
 (0)