Btrfs: properly check free space for tree balancing
authorYan Zheng <zheng.yan@oracle.com>
Wed, 17 Dec 2008 15:21:48 +0000 (10:21 -0500)
committerChris Mason <chris.mason@oracle.com>
Wed, 17 Dec 2008 15:21:48 +0000 (10:21 -0500)
commit87b29b208c6c38f3446d2de6ece946e2459052cf
tree43e717289e1e8446fced4093ab39667bba9ea60a
parentd7f735d0bc68c411abda0a612e1421bdade649cc
Btrfs: properly check free space for tree balancing

btrfs_insert_empty_items takes the space needed by the btrfs_item
structure into account when calculating the required free space.

So the tree balancing code shouldn't add sizeof(struct btrfs_item)
to the size when checking the free space. This patch removes these
superfluous additions.

Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
fs/btrfs/ctree.c
fs/btrfs/file-item.c
fs/btrfs/tree-log.c