提交 0138b6fe 编写于 作者: B Byongho Lee 提交者: David Sterba

btrfs: simplify expression in btrfs_calc_trans_metadata_size()

Simplify expression in btrfs_calc_trans_metadata_size().
Signed-off-by: NByongho Lee <bhlee.kernel@gmail.com>
Reviewed-by: NStefan Behrens <sbehrens@giantdisaster.de>
Signed-off-by: NDavid Sterba <dsterba@suse.com>
上级 388f7b1d
......@@ -3448,8 +3448,7 @@ u64 btrfs_csum_bytes_to_leaves(struct btrfs_root *root, u64 csum_bytes);
static inline u64 btrfs_calc_trans_metadata_size(struct btrfs_root *root,
unsigned num_items)
{
return (root->nodesize + root->nodesize * (BTRFS_MAX_LEVEL - 1)) *
2 * num_items;
return root->nodesize * BTRFS_MAX_LEVEL * 2 * num_items;
}
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册