On 12/02/2020 08:21, Naohiro Aota wrote: > + if (!(type & BTRFS_BLOCK_GROUP_TYPE_MASK)) { > + btrfs_err(info, "invalid chunk type 0x%llx requested", type); > + BUG(); > + } This could be if (!(type & BTRFS_BLOCK_GROUP_TYPE_MASK)) { btrfs_err(info, "invalid chunk type 0x%llx requested", type); ASSERT(0); return -EINVAL; } as well.