提交 1514794e 编写于 作者: C Chris Mason

Btrfs: Make sure nodes have enough room for a double split

Signed-off-by: NChris Mason <chris.mason@oracle.com>
上级 bcbfce8a
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册