Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 147764
b: refs/heads/master
c: b361242
h: refs/heads/master
v: v3
  • Loading branch information
Chris Mason committed Jun 10, 2009
1 parent ca72d3e commit 02696fd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5d4f98a28c7d334091c1b7744f48a1acdd2a4ae0
refs/heads/master: b36124210248706186a02093427bdff4b3f548e8
11 changes: 4 additions & 7 deletions trunk/fs/btrfs/ctree.c
Original file line number Diff line number Diff line change
Expand Up @@ -1052,8 +1052,7 @@ static noinline int balance_level(struct btrfs_trans_handle *trans,
BTRFS_NODEPTRS_PER_BLOCK(root) / 4)
return 0;

if (trans->transaction->delayed_refs.flushing &&
btrfs_header_nritems(mid) > 2)
if (btrfs_header_nritems(mid) > 2)
return 0;

if (btrfs_header_nritems(mid) < 2)
Expand Down Expand Up @@ -2194,7 +2193,7 @@ static noinline int split_node(struct btrfs_trans_handle *trans,
ret = insert_new_root(trans, root, path, level + 1);
if (ret)
return ret;
} else if (!trans->transaction->delayed_refs.flushing) {
} else {
ret = push_nodes_for_insert(trans, root, path, level);
c = path->nodes[level];
if (!ret && btrfs_header_nritems(c) <
Expand Down Expand Up @@ -2869,8 +2868,7 @@ static noinline int split_leaf(struct btrfs_trans_handle *trans,
int num_doubles = 0;

/* first try to make some room by pushing left and right */
if (data_size && ins_key->type != BTRFS_DIR_ITEM_KEY &&
!trans->transaction->delayed_refs.flushing) {
if (data_size && ins_key->type != BTRFS_DIR_ITEM_KEY) {
wret = push_leaf_right(trans, root, path, data_size, 0);
if (wret < 0)
return wret;
Expand Down Expand Up @@ -3809,8 +3807,7 @@ int btrfs_del_items(struct btrfs_trans_handle *trans, struct btrfs_root *root,
}

/* delete the leaf if it is mostly empty */
if (used < BTRFS_LEAF_DATA_SIZE(root) / 4 &&
!trans->transaction->delayed_refs.flushing) {
if (used < BTRFS_LEAF_DATA_SIZE(root) / 4) {
/* push_leaf_left fixes the path.
* make sure the path still points to our leaf
* for possible call to del_ptr below
Expand Down

0 comments on commit 02696fd

Please sign in to comment.