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>
This commit is contained in:
parent
ff1b89f389
commit
bf5c1898bf
|
@ -928,9 +928,16 @@ static int fuse_update_get_attr(struct inode *inode, struct file *file,
|
||||||
{
|
{
|
||||||
struct fuse_inode *fi = get_fuse_inode(inode);
|
struct fuse_inode *fi = get_fuse_inode(inode);
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
bool sync;
|
||||||
|
|
||||||
if (!(flags & AT_STATX_DONT_SYNC) &&
|
if (flags & AT_STATX_FORCE_SYNC)
|
||||||
time_before64(fi->i_time, get_jiffies_64())) {
|
sync = true;
|
||||||
|
else if (flags & AT_STATX_DONT_SYNC)
|
||||||
|
sync = false;
|
||||||
|
else
|
||||||
|
sync = time_before64(fi->i_time, get_jiffies_64());
|
||||||
|
|
||||||
|
if (sync) {
|
||||||
forget_all_cached_acls(inode);
|
forget_all_cached_acls(inode);
|
||||||
err = fuse_do_getattr(inode, stat, file);
|
err = fuse_do_getattr(inode, stat, file);
|
||||||
} else if (stat) {
|
} else if (stat) {
|
||||||
|
|
Loading…
Reference in New Issue