Skip to content

Commit

Permalink
Btrfs: Make sure nodes have enough room for a double split
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Mason <chris.mason@oracle.com>
  • Loading branch information
Chris Mason committed Sep 25, 2008
1 parent bcbfce8 commit 1514794
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/ctree.c
Original file line number Diff line number Diff line change
Expand Up @@ -1146,7 +1146,7 @@ int btrfs_search_slot(struct btrfs_trans_handle *trans, struct btrfs_root
slot -= 1;
p->slots[level] = slot;
if (ins_len > 0 && btrfs_header_nritems(b) >=
BTRFS_NODEPTRS_PER_BLOCK(root) - 1) {
BTRFS_NODEPTRS_PER_BLOCK(root) - 3) {
int sret = split_node(trans, root, p, level);
BUG_ON(sret > 0);
if (sret)
Expand Down

0 comments on commit 1514794

Please sign in to comment.