Commit d233c7dd authored by Miklos Szeredi's avatar Miklos Szeredi
Browse files

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: default avatarMiklos Szeredi <mszeredi@redhat.com>
Fixes: 2f1e8196 ("fuse: allow fine grained attr cache invaldation")
parent a9c2d1e8
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment