浏览代码

Btrfs: Fix split_node to require more empty slots in the node as well

Signed-off-by: Chris Mason <chris.mason@oracle.com>
Chris Mason 17 年之前
父节点
当前提交
c448acf0a0
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      fs/btrfs/ctree.c

+ 1 - 1
fs/btrfs/ctree.c

@@ -1485,7 +1485,7 @@ static int split_node(struct btrfs_trans_handle *trans, struct btrfs_root
 		ret = push_nodes_for_insert(trans, root, path, level);
 		c = path->nodes[level];
 		if (!ret && btrfs_header_nritems(c) <
-		    BTRFS_NODEPTRS_PER_BLOCK(root) - 1)
+		    BTRFS_NODEPTRS_PER_BLOCK(root) - 3)
 			return 0;
 		if (ret < 0)
 			return ret;