diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2018-12-03 10:14:43 +0100 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2018-12-03 10:14:43 +0100 |
commit | d233c7dd1682437ba4b430b04766aa6eef9aef67 (patch) | |
tree | 72a1116cb4e9fb331a9bf35fe0f5ee3858c98579 /fs/fuse | |
parent | a9c2d1e82fc2937baf43c0d400f0c9e87dcf035d (diff) | |
download | blackbird-op-linux-d233c7dd1682437ba4b430b04766aa6eef9aef67.tar.gz blackbird-op-linux-d233c7dd1682437ba4b430b04766aa6eef9aef67.zip |
fuse: fix revalidation of attributes for permission check
fuse_invalidate_attr() now sets fi->inval_mask instead of fi->i_time, hence
we need to check the inval mask in fuse_permission() as well.
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Fixes: 2f1e81965fd0 ("fuse: allow fine grained attr cache invaldation")
Diffstat (limited to 'fs/fuse')
-rw-r--r-- | fs/fuse/dir.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index 56931dfdcc46..dc4e83d8ace7 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -1119,8 +1119,10 @@ static int fuse_permission(struct inode *inode, int mask) if (fc->default_permissions || ((mask & MAY_EXEC) && S_ISREG(inode->i_mode))) { struct fuse_inode *fi = get_fuse_inode(inode); + u32 perm_mask = STATX_MODE | STATX_UID | STATX_GID; - if (time_before64(fi->i_time, get_jiffies_64())) { + if (perm_mask & READ_ONCE(fi->inval_mask) || + time_before64(fi->i_time, get_jiffies_64())) { refreshed = true; err = fuse_perm_getattr(inode, mask); |