[PATCH 52/52] fuse: fix fuse_permission() for the default_permissions case

From: Vivek Goyal
Date: Mon Dec 10 2018 - 12:17:01 EST


From: Miklos Szeredi <mszeredi@xxxxxxxxxx>

Fixes: f064cab7f6ee ("fuse: add shared version support (virtio-fs only)")
Signed-off-by: Miklos Szeredi <mszeredi@xxxxxxxxxx>
---
fs/fuse/dir.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index f9a91e782cf0..f1da787796e8 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -1324,7 +1324,7 @@ static int fuse_permission(struct inode *inode, int mask)

if (fc->default_permissions) {
err = -EACCES;
- if (!refreshed && !fuse_shared_version_mismatch(inode))
+ if (refreshed || !fuse_shared_version_mismatch(inode))
err = generic_permission(inode, mask);

/* If permission is denied, try to refresh file
--
2.13.6