diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2021-10-22 17:03:03 +0200 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2021-10-28 09:45:33 +0200 |
commit | 4b52f059b5ddbb364d35f2bcc3d267a009078db7 (patch) | |
tree | 324d16a1a8e885239fbf26ae63ae9a942c911363 /fs/fuse/dir.c | |
parent | 04d82db0c557e074a5d898b43de81fe659b9cc5a (diff) |
fuse: add cache_mask
If writeback_cache is enabled, then the size, mtime and ctime attributes of
regular files are always valid in the kernel's cache. They are retrieved
from userspace only when the inode is freshly looked up.
Add a more generic "cache_mask", that indicates which attributes are
currently valid in cache.
This patch doesn't change behavior.
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/fuse/dir.c')
-rw-r--r-- | fs/fuse/dir.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index d4172390f2b1..4c934627b419 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -1667,7 +1667,8 @@ int fuse_do_setattr(struct dentry *dentry, struct iattr *attr, } fuse_change_attributes_common(inode, &outarg.attr, - attr_timeout(&outarg)); + attr_timeout(&outarg), + fuse_get_cache_mask(inode)); oldsize = inode->i_size; /* see the comment in fuse_change_attributes() */ if (!is_wb || is_truncate) |