Lines Matching refs:existing_ref
461 struct btrfs_delayed_ref_head *existing_ref; in update_existing_head_ref() local
465 existing_ref = btrfs_delayed_node_to_head(existing); in update_existing_head_ref()
467 BUG_ON(existing_ref->is_data != ref->is_data); in update_existing_head_ref()
469 spin_lock(&existing_ref->lock); in update_existing_head_ref()
478 existing_ref->must_insert_reserved = ref->must_insert_reserved; in update_existing_head_ref()
489 if (!existing_ref->extent_op) { in update_existing_head_ref()
490 existing_ref->extent_op = ref->extent_op; in update_existing_head_ref()
493 memcpy(&existing_ref->extent_op->key, in update_existing_head_ref()
496 existing_ref->extent_op->update_key = 1; in update_existing_head_ref()
499 existing_ref->extent_op->flags_to_set |= in update_existing_head_ref()
501 existing_ref->extent_op->update_flags = 1; in update_existing_head_ref()
511 old_ref_mod = existing_ref->total_ref_mod; in update_existing_head_ref()
513 existing_ref->total_ref_mod += update->ref_mod; in update_existing_head_ref()
519 if (existing_ref->is_data) { in update_existing_head_ref()
520 if (existing_ref->total_ref_mod >= 0 && old_ref_mod < 0) in update_existing_head_ref()
522 if (existing_ref->total_ref_mod < 0 && old_ref_mod >= 0) in update_existing_head_ref()
525 spin_unlock(&existing_ref->lock); in update_existing_head_ref()