diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2018-03-20 12:11:44 -0400 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2018-03-20 12:11:44 -0400 |
commit | bf5c1898bf9e6d5ce9840743e8eccc74c14d16a4 (patch) | |
tree | f71108968a73ea12d9678424a101fcfce165f58c | |
parent | ff1b89f389a8e64d0a583ce0b0308696f4ab5860 (diff) |
fuse: honor AT_STATX_FORCE_SYNC
Force a refresh of attributes from the fuse server in this case.
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
-rw-r--r-- | fs/fuse/dir.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index ef883f0bee8f..56231b31f806 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c | |||
@@ -928,9 +928,16 @@ static int fuse_update_get_attr(struct inode *inode, struct file *file, | |||
928 | { | 928 | { |
929 | struct fuse_inode *fi = get_fuse_inode(inode); | 929 | struct fuse_inode *fi = get_fuse_inode(inode); |
930 | int err = 0; | 930 | int err = 0; |
931 | bool sync; | ||
931 | 932 | ||
932 | if (!(flags & AT_STATX_DONT_SYNC) && | 933 | if (flags & AT_STATX_FORCE_SYNC) |
933 | time_before64(fi->i_time, get_jiffies_64())) { | 934 | sync = true; |
935 | else if (flags & AT_STATX_DONT_SYNC) | ||
936 | sync = false; | ||
937 | else | ||
938 | sync = time_before64(fi->i_time, get_jiffies_64()); | ||
939 | |||
940 | if (sync) { | ||
934 | forget_all_cached_acls(inode); | 941 | forget_all_cached_acls(inode); |
935 | err = fuse_do_getattr(inode, stat, file); | 942 | err = fuse_do_getattr(inode, stat, file); |
936 | } else if (stat) { | 943 | } else if (stat) { |