Index: sys/fs/ext2fs/ext2_vnops.c =================================================================== --- sys/fs/ext2fs/ext2_vnops.c +++ sys/fs/ext2fs/ext2_vnops.c @@ -1889,6 +1889,8 @@ { struct inode *ip; struct ufid *ufhp; + _Static_assert(sizeof(struct ufid) <= sizeof(struct fid), + "struct ufid cannot be larger than struct fid"); ip = VTOI(ap->a_vp); ufhp = (struct ufid *)ap->a_fhp; Index: sys/fs/msdosfs/msdosfs_vnops.c =================================================================== --- sys/fs/msdosfs/msdosfs_vnops.c +++ sys/fs/msdosfs/msdosfs_vnops.c @@ -1962,6 +1962,8 @@ { struct denode *dep; struct defid *defhp; + _Static_assert(sizeof(struct defid) <= sizeof(struct fid), + "struct defid cannot be larger than struct fid"); dep = VTODE(ap->a_vp); defhp = (struct defid *)ap->a_fhp; Index: sys/fs/tarfs/tarfs_vnops.c =================================================================== --- sys/fs/tarfs/tarfs_vnops.c +++ sys/fs/tarfs/tarfs_vnops.c @@ -668,6 +668,8 @@ { struct tarfs_fid *tfp; struct tarfs_node *tnp; + _Static_assert(sizeof(struct tarfs_fid) <= sizeof(struct fid), + "struct tarfs_fid cannot be larger than struct fid"); tfp = (struct tarfs_fid *)ap->a_fhp; tnp = VP_TO_TARFS_NODE(ap->a_vp); Index: sys/fs/tmpfs/tmpfs_vnops.c =================================================================== --- sys/fs/tmpfs/tmpfs_vnops.c +++ sys/fs/tmpfs/tmpfs_vnops.c @@ -1709,6 +1709,8 @@ struct tmpfs_fid_data tfd; struct tmpfs_node *node; struct fid *fhp; + _Static_assert(sizeof(struct tmpfs_fid_data) <= sizeof(struct fid), + "struct tmpfs_fid_data cannot be larger than struct fid"); node = VP_TO_TMPFS_NODE(ap->a_vp); fhp = ap->a_fhp; Index: sys/fs/udf/udf_vnops.c =================================================================== --- sys/fs/udf/udf_vnops.c +++ sys/fs/udf/udf_vnops.c @@ -1274,6 +1274,8 @@ { struct udf_node *node; struct ifid *ifhp; + _Static_assert(sizeof(struct ifid) <= sizeof(struct fid), + "struct ifid cannot be larger than struct fid"); node = VTON(a->a_vp); ifhp = (struct ifid *)a->a_fhp; Index: sys/ufs/ffs/ffs_vnops.c =================================================================== --- sys/ufs/ffs/ffs_vnops.c +++ sys/ufs/ffs/ffs_vnops.c @@ -1919,6 +1919,8 @@ { struct inode *ip; struct ufid *ufhp; + _Static_assert(sizeof(struct ufid) <= sizeof(struct fid), + "struct ufid cannot be larger than struct fid"); ip = VTOI(ap->a_vp); ufhp = (struct ufid *)ap->a_fhp;