diff --git a/fs/fuse/backing.c b/fs/fuse/backing.c index 9612aaa0f452..041af4e0ab5b 100644 --- a/fs/fuse/backing.c +++ b/fs/fuse/backing.c @@ -1967,7 +1967,10 @@ int fuse_getattr_backing(struct fuse_bpf_args *fa, if (!stat) stat = &tmp; - err = vfs_getattr(backing_path, stat, request_mask, flags); + if (flags & AT_GETATTR_NOSEC) + err = vfs_getattr_nosec(backing_path, stat, request_mask, flags); + else + err = vfs_getattr(backing_path, stat, request_mask, flags); if (!err) fuse_stat_to_attr(get_fuse_conn(entry->d_inode), diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index 99e5617d6683..67c48d2df8b7 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c @@ -538,7 +538,7 @@ static void fuse_args_to_req(struct fuse_req *req, struct fuse_args *args) { req->in.h.opcode = args->opcode; req->in.h.nodeid = args->nodeid; - req->in.h.padding = args->error_in; + req->in.h.error_in = args->error_in; req->args = args; if (args->is_ext) req->in.h.total_extlen = args->in_args[args->ext_idx].size / 8; diff --git a/include/uapi/linux/fuse.h b/include/uapi/linux/fuse.h index ab9ee787ee90..24138c5f483a 100644 --- a/include/uapi/linux/fuse.h +++ b/include/uapi/linux/fuse.h @@ -1013,8 +1013,19 @@ struct fuse_in_header { uint32_t uid; uint32_t gid; uint32_t pid; - uint16_t total_extlen; /* length of extensions in 8byte units */ - uint16_t padding; + + /* + * fuse-bpf reused the padding field to pass errors to postfilter + * Unfortunately this field has now been used for extlen. + * Manage at least temporarily with a union + */ + union { + struct { + uint16_t total_extlen; /* length of extensions in 8byte units */ + uint16_t padding; + }; + uint32_t error_in; + }; }; struct fuse_out_header {