summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-04-24 15:22:51 +0200
committerChris Mason <chris.mason@oracle.com>2008-09-25 17:04:02 +0200
commit1514794e4253cf4a32a2acc6de52f2527ca1bdce (patch)
treeb028c3062905e2a44e18b5dbb24c77c5a6775315 /fs
parentBtrfs: Fix the unplug_io_fn to grab a consistent copy of page->mapping (diff)
downloadlinux-1514794e4253cf4a32a2acc6de52f2527ca1bdce.tar.xz
linux-1514794e4253cf4a32a2acc6de52f2527ca1bdce.zip
Btrfs: Make sure nodes have enough room for a double split
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/ctree.c2
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:
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)