summaryrefslogtreecommitdiff
path: root/ctree.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-03-17 14:29:23 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-03-17 14:29:23 -0400
commit6fb67c4e825f01fc5712590a6def992728cc6eb6 (patch)
treef32276b2ead376a39f361a9d3670070ce71b2eda /ctree.c
parentf247156e4f46cb15fdb6180dbb690e87fb2472d1 (diff)
minor comments
Diffstat (limited to 'ctree.c')
-rw-r--r--ctree.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ctree.c b/ctree.c
index 17a3ff2f..32922643 100644
--- a/ctree.c
+++ b/ctree.c
@@ -294,6 +294,10 @@ static int balance_level(struct btrfs_trans_handle *trans, struct btrfs_root
parent_buf = path->nodes[level + 1];
pslot = path->slots[level + 1];
+ /*
+ * deal with the case where there is only one pointer in the root
+ * by promoting the node below to a root
+ */
if (!parent_buf) {
struct btrfs_buffer *child;
u64 blocknr = mid_buf->blocknr;
@@ -1043,6 +1047,7 @@ static int split_leaf(struct btrfs_trans_handle *trans, struct btrfs_root
int ret;
int wret;
+ /* first try to make some room by pushing left and right */
wret = push_leaf_left(trans, root, path, data_size);
if (wret < 0)
return wret;