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 | c6c745b81033a4c1f0e5f3b16398a10f2d000c29 (patch) | |
tree | 5f4c90689a9e891a43b79a97d862221dece1ce9c /fs/fuse/readdir.c | |
parent | ec85537519b330a0deb8fe742fd1b0efc40a1710 (diff) |
fuse: only update necessary attributes
fuse_update_attributes() refreshes metadata for internal use.
Each use needs a particular set of attributes to be refreshed, but
currently that cannot be expressed and all but atime are refreshed.
Add a mask argument, which lets fuse_update_get_attr() to decide based on
the cache_mask and the inval_mask whether a GETATTR call is needed or not.
Reported-by: Yongji Xie <xieyongji@bytedance.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/fuse/readdir.c')
-rw-r--r-- | fs/fuse/readdir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/fuse/readdir.c b/fs/fuse/readdir.c index e38ac983435a..b4e565711045 100644 --- a/fs/fuse/readdir.c +++ b/fs/fuse/readdir.c @@ -454,7 +454,7 @@ static int fuse_readdir_cached(struct file *file, struct dir_context *ctx) * cache; both cases require an up-to-date mtime value. */ if (!ctx->pos && fc->auto_inval_data) { - int err = fuse_update_attributes(inode, file); + int err = fuse_update_attributes(inode, file, STATX_MTIME); if (err) return err; |