[PATCH] fuse:rely on fuse_perm for exec when no mode bits set

From: Chakra Divi
Date: Wed Apr 01 2020 - 05:31:24 EST


In current code, for exec we are checking mode bits
for x bit set even though the fuse_perm_getattr returns
success. Changes in this patch avoids mode bit explicit
check, leaves the exec checking to fuse file system
in uspace.

Signed-off-by: Chakra Divi <chakragithub@xxxxxxxxx>
---
fs/fuse/dir.c | 5 -----
1 file changed, 5 deletions(-)

diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index de1e2fde..7b44c4e 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -1196,12 +1196,7 @@ static int fuse_permission(struct inode *inode, int mask)
err = fuse_access(inode, mask);
} else if ((mask & MAY_EXEC) && S_ISREG(inode->i_mode)) {
if (!(inode->i_mode & S_IXUGO)) {
- if (refreshed)
- return -EACCES;
-
err = fuse_perm_getattr(inode, mask);
- if (!err && !(inode->i_mode & S_IXUGO))
- return -EACCES;
}
}
return err;
--
2.7.4