aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/ctree.c')
-rw-r--r--fs/btrfs/ctree.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index 978449af4ccd..3fdcc0512d3a 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -1040,9 +1040,6 @@ static noinline int balance_level(struct btrfs_trans_handle *trans,
1040 BTRFS_NODEPTRS_PER_BLOCK(root) / 4) 1040 BTRFS_NODEPTRS_PER_BLOCK(root) / 4)
1041 return 0; 1041 return 0;
1042 1042
1043 if (btrfs_header_nritems(mid) > 2)
1044 return 0;
1045
1046 if (btrfs_header_nritems(mid) < 2) 1043 if (btrfs_header_nritems(mid) < 2)
1047 err_on_enospc = 1; 1044 err_on_enospc = 1;
1048 1045
@@ -3796,7 +3793,7 @@ int btrfs_del_items(struct btrfs_trans_handle *trans, struct btrfs_root *root,
3796 } 3793 }
3797 3794
3798 /* delete the leaf if it is mostly empty */ 3795 /* delete the leaf if it is mostly empty */
3799 if (used < BTRFS_LEAF_DATA_SIZE(root) / 2) { 3796 if (used < BTRFS_LEAF_DATA_SIZE(root) / 3) {
3800 /* push_leaf_left fixes the path. 3797 /* push_leaf_left fixes the path.
3801 * make sure the path still points to our leaf 3798 * make sure the path still points to our leaf
3802 * for possible call to del_ptr below 3799 * for possible call to del_ptr below