diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2021-10-22 17:03:02 +0200 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2021-10-28 09:45:32 +0200 |
commit | fa5eee57e33e79b71b40e6950c29cc46f5cc5cb7 (patch) | |
tree | 92ed8a392c657de447ef8eb8c3a5f7fc72140542 /fs/fuse/dir.c | |
parent | fuse: don't increment nlink in link() (diff) | |
download | linux-fa5eee57e33e79b71b40e6950c29cc46f5cc5cb7.tar.xz linux-fa5eee57e33e79b71b40e6950c29cc46f5cc5cb7.zip |
fuse: selective attribute invalidation
Only invalidate attributes that the operation might have changed.
Introduce two constants for common combinations of changed attributes:
FUSE_STATX_MODIFY: file contents are modified but not size
FUSE_STATX_MODSIZE: size and/or file contents modified
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/fuse/dir.c')
-rw-r--r-- | fs/fuse/dir.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index 26587affaf2c..8315ca75d657 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -116,7 +116,7 @@ u64 entry_attr_timeout(struct fuse_entry_out *o) return time_to_jiffies(o->attr_valid, o->attr_valid_nsec); } -static void fuse_invalidate_attr_mask(struct inode *inode, u32 mask) +void fuse_invalidate_attr_mask(struct inode *inode, u32 mask) { set_mask_bits(&get_fuse_inode(inode)->inval_mask, 0, mask); } @@ -756,7 +756,7 @@ static void fuse_update_ctime_in_cache(struct inode *inode) void fuse_update_ctime(struct inode *inode) { - fuse_invalidate_attr(inode); + fuse_invalidate_attr_mask(inode, STATX_CTIME); fuse_update_ctime_in_cache(inode); } |