diff options
author | Byongho Lee <bhlee.kernel@gmail.com> | 2016-01-27 01:33:04 +0900 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-02-18 11:33:17 +0100 |
commit | 0138b6fe8f7ea6aa83ed7ccfcabc89b490528ce8 (patch) | |
tree | 9b9fa1a0c79ca6c04951b42fd59d7632fc356b8b /fs/btrfs | |
parent | 388f7b1d6e8ca06762e2454d28d6c3c55ad0fe95 (diff) | |
download | linux-0138b6fe8f7ea6aa83ed7ccfcabc89b490528ce8.tar.gz linux-0138b6fe8f7ea6aa83ed7ccfcabc89b490528ce8.tar.bz2 linux-0138b6fe8f7ea6aa83ed7ccfcabc89b490528ce8.zip |
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>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/ctree.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h index bfe4a337fb4d..91449e41d88d 100644 --- a/fs/btrfs/ctree.h +++ b/fs/btrfs/ctree.h @@ -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; } /* |