The two 16-bit fields in `struct fuse_fid` are padded to the 64-bit alignment of the 64-bit field. This pushes the offsets of the subsequent fields by 4 bytes and makes `struct fuse_fid` bigger than `struct fid`. `fuse_vnop_vptofh()` casts a `struct fid *` to `struct fuse_fid *`, causing 4 bytes of adjacent memory to be overwritten when the struct fields are set.
Instead of duplicating fields of `struct fid` in `struct fuse_fid`, narrow the struct to cover only the unique fields for fuse and assert at compile time that the struct fits in the allotted space. This way we don't have to replicate the offsets of `struct fid` fields, we just use them directly.