From: Chris Mason Date: Thu, 24 Apr 2008 13:22:51 +0000 (-0400) Subject: Btrfs: Make sure nodes have enough room for a double split X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=1514794e4253cf4a32a2acc6de52f2527ca1bdce;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Btrfs: Make sure nodes have enough room for a double split Signed-off-by: Chris Mason --- 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)