diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-04-24 09:22:51 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:04:02 -0400 |
commit | 1514794e4253cf4a32a2acc6de52f2527ca1bdce (patch) | |
tree | b028c3062905e2a44e18b5dbb24c77c5a6775315 | |
parent | bcbfce8abd5f8d3f84eab60a9df1ec147f81c34f (diff) |
Btrfs: Make sure nodes have enough room for a double split
Signed-off-by: Chris Mason <chris.mason@oracle.com>
-rw-r--r-- | fs/btrfs/ctree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 1c3d9d6fbdad..8ad8b5cc295a 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c | |||
@@ -1146,7 +1146,7 @@ again: | |||
1146 | slot -= 1; | 1146 | slot -= 1; |
1147 | p->slots[level] = slot; | 1147 | p->slots[level] = slot; |
1148 | if (ins_len > 0 && btrfs_header_nritems(b) >= | 1148 | if (ins_len > 0 && btrfs_header_nritems(b) >= |
1149 | BTRFS_NODEPTRS_PER_BLOCK(root) - 1) { | 1149 | BTRFS_NODEPTRS_PER_BLOCK(root) - 3) { |
1150 | int sret = split_node(trans, root, p, level); | 1150 | int sret = split_node(trans, root, p, level); |
1151 | BUG_ON(sret > 0); | 1151 | BUG_ON(sret > 0); |
1152 | if (sret) | 1152 | if (sret) |