mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-01 11:21:51 +00:00
btrfs: simplify expression in btrfs_calc_trans_metadata_size()
Simplify expression in btrfs_calc_trans_metadata_size(). Signed-off-by: Byongho Lee <bhlee.kernel@gmail.com> Reviewed-by: Stefan Behrens <sbehrens@giantdisaster.de> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
388f7b1d6e
commit
0138b6fe8f
1 changed files with 1 additions and 2 deletions
|
@ -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,
|
static inline u64 btrfs_calc_trans_metadata_size(struct btrfs_root *root,
|
||||||
unsigned num_items)
|
unsigned num_items)
|
||||||
{
|
{
|
||||||
return (root->nodesize + root->nodesize * (BTRFS_MAX_LEVEL - 1)) *
|
return root->nodesize * BTRFS_MAX_LEVEL * 2 * num_items;
|
||||||
2 * num_items;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue