/* This either makes the current running log transaction wait until you call btrfs_end_log_trans() or it makes any future log transactions wait until you call btrfs_end_log_trans()  */
int btrfs_pin_log_trans(struct btrfs_root *root)
/* This either makes the current running log transaction wait until you call btrfs_end_log_trans() or it makes any future log transactions wait until you call btrfs_end_log_trans()  */
int btrfs_pin_log_trans(struct btrfs_root *root)
{
	int ret = -ENOENT;
	mutex_lock(&root->log_mutex);
	atomic_inc(&root->log_writers);
	mutex_unlock(&root->log_mutex);
	return ret;
}