We know nodesize should not overflow with the shift, but le'ts make the
code correct if the resulting type can store the full value.
Resolves-coverity-id: 1358120
Signed-off-by: David Sterba <dsterba@suse.com>
*/
static inline u64 btrfs_min_global_blk_rsv_size(u32 nodesize)
{
- return nodesize << 10;
+ return (u64)nodesize << 10;
}
+
static inline u64 btrfs_min_dev_size(u32 nodesize)
{
return 2 * (BTRFS_MKFS_SYSTEM_GROUP_SIZE +