diff options
author | Chris Mason <chris.mason@oracle.com> | 2007-03-13 11:17:52 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@hera.kernel.org> | 2007-03-13 11:17:52 -0400 |
commit | eaee50e881b88766d9a781c54c4142456cf5e527 (patch) | |
tree | 77d26155f563d20d431592236493bde4ae9d9b08 /fs/btrfs/ctree.c | |
parent | 9aca1d51323c0291a7358e0728b64ec4f17d1a77 (diff) | |
download | lwn-eaee50e881b88766d9a781c54c4142456cf5e527.tar.gz lwn-eaee50e881b88766d9a781c54c4142456cf5e527.zip |
Btrfs: merge leaves before split
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/ctree.c')
-rw-r--r-- | fs/btrfs/ctree.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index bbb632291709..dc620186e501 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -1043,6 +1043,15 @@ static int split_leaf(struct btrfs_root *root, struct btrfs_path *path, int ret; int wret; + wret = push_leaf_left(root, path, data_size); + if (wret < 0) + return wret; + if (wret) { + wret = push_leaf_right(root, path, data_size); + if (wret < 0) + return wret; + } + l_buf = path->nodes[0]; l = &l_buf->leaf; |