/* Add a struct btrfs_ordered_sum into the list of checksums to be inserted when an ordered extent is finished. If the list covers more than one ordered extent, it is split across multiples.  */
int btrfs_add_ordered_sum(struct inode *inode, struct btrfs_ordered_extent *entry, struct btrfs_ordered_sum *sum)
/* Add a struct btrfs_ordered_sum into the list of checksums to be inserted when an ordered extent is finished. If the list covers more than one ordered extent, it is split across multiples.  */
int btrfs_add_ordered_sum(struct inode *inode, struct btrfs_ordered_extent *entry, struct btrfs_ordered_sum *sum)
{
	struct btrfs_ordered_inode_tree *tree;
	tree = &BTRFS_I(inode)->ordered_tree;
	mutex_lock(&tree->mutex);
	list_add_tail(&sum->list, &entry->list);
	mutex_unlock(&tree->mutex);
	return 0;
}