summaryrefslogtreecommitdiffstats
path: root/fs/9p/vfs_inode.c
diff options
context:
space:
mode:
authorEric Van Hensbergen <ericvh@kernel.org>2022-12-08 02:03:32 +0000
committerEric Van Hensbergen <ericvh@kernel.org>2023-02-23 22:39:36 +0000
commit344504e912ea49033d012dad9de3f68e20c07634 (patch)
treeba2a6c0b0d224fe032138de6f922544edc955154 /fs/9p/vfs_inode.c
parent2a03472262c05f965d7ba394ed35dc9867ba3095 (diff)
downloadlinux-344504e912ea49033d012dad9de3f68e20c07634.tar.gz
linux-344504e912ea49033d012dad9de3f68e20c07634.tar.bz2
linux-344504e912ea49033d012dad9de3f68e20c07634.zip
fs/9p: Expand setup of writeback cache to all levels
If cache is enabled, make sure we are putting the right things in place (mainly impacts mmap). This also sets us up for more cache levels. Signed-off-by: Eric Van Hensbergen <ericvh@kernel.org> Reviewed-by: Dominique Martinet <asmadeus@codewreck.org>
Diffstat (limited to 'fs/9p/vfs_inode.c')
-rw-r--r--fs/9p/vfs_inode.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index 27a04a226d97..33e521c60e2c 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -843,8 +843,7 @@ v9fs_vfs_atomic_open(struct inode *dir, struct dentry *dentry,
inode = d_inode(dentry);
v9inode = V9FS_I(inode);
mutex_lock(&v9inode->v_mutex);
- if ((v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE) &&
- !v9inode->writeback_fid &&
+ if ((v9ses->cache) && !v9inode->writeback_fid &&
((flags & O_ACCMODE) != O_RDONLY)) {
/*
* clone a fid and add it to writeback_fid