From 711aab4fc879a49341c735c8d02a31b92cf7c459 Mon Sep 17 00:00:00 2001 From: Paul Lawrence Date: Tue, 11 Jan 2022 21:31:18 +0000 Subject: [PATCH] UPSTREAM: ANDROID: fuse-bpf: Make compile with CONFIG_FUSE but no CONFIG_FUSE_BPF Fixes: ANDROID: fuse-bpf: Fix perms on readdir Test: Builds with and without CONFIG_FUSE_BPF Bug: 202785178 Signed-off-by: Paul Lawrence Change-Id: If8b4603dd6f4bd159bfd68fc61c377dcb62ebcd0 --- fs/fuse/dir.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index b2aa101ab2ef..e04b3c77397f 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -1566,8 +1566,10 @@ static int fuse_permission(struct inode *inode, int mask) if (!err && !(inode->i_mode & S_IXUGO)) return -EACCES; } +#ifdef CONFIG_FUSE_BPF } else if (!(mask & MAY_NOT_BLOCK) && fi->backing_inode) { err = fuse_access(inode, mask); +#endif } return err; }