summaryrefslogtreecommitdiff
path: root/fs/9p/vfs_super.c
diff options
context:
space:
mode:
authorEric Van Hensbergen <ericvh@kernel.org>2024-04-15 23:24:37 +0300
committerEric Van Hensbergen <ericvh@kernel.org>2024-04-22 18:34:27 +0300
commitd05dcfdf5e1659b2949d13060284eff3888b644e (patch)
treea939610972e373a47c85686b68061acea929b5d0 /fs/9p/vfs_super.c
parented30a4a51bb196781c8058073ea720133a65596f (diff)
downloadlinux-d05dcfdf5e1659b2949d13060284eff3888b644e.tar.xz
fs/9p: mitigate inode collisions
Detect and mitigate inode collsions that now occur since we fixed 9p generating duplicate inode structures. Underlying cause of these appears to be a race condition between reuse of inode numbers in underlying file system and cleanup of inode numbers in the client. Enabling caching makes this much more likely to happen as it increases cleanup latency due to writebacks. Reported-by: Kent Overstreet <kent.overstreet@linux.dev> Signed-off-by: Eric Van Hensbergen <ericvh@kernel.org>
Diffstat (limited to 'fs/9p/vfs_super.c')
-rw-r--r--fs/9p/vfs_super.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/9p/vfs_super.c b/fs/9p/vfs_super.c
index 55e67e36ae68..f52fdf42945c 100644
--- a/fs/9p/vfs_super.c
+++ b/fs/9p/vfs_super.c
@@ -139,7 +139,7 @@ static struct dentry *v9fs_mount(struct file_system_type *fs_type, int flags,
else
sb->s_d_op = &v9fs_dentry_operations;
- inode = v9fs_get_inode_from_fid(v9ses, fid, sb);
+ inode = v9fs_get_inode_from_fid(v9ses, fid, sb, true);
if (IS_ERR(inode)) {
retval = PTR_ERR(inode);
goto release_sb;