Skip to content
Commit 1a81af4d authored by Chris Mason's avatar Chris Mason
Browse files

Btrfs: make sure btrfs_update_delayed_ref doesn't increase ref_mod



btrfs_update_delayed_ref is optimized to add and remove different
references in one pass through the delayed ref tree.  It is a zero
sum on the total number of refs on a given extent.

But, the code was recording an extra ref in the head node.  This
never made it down to the disk but was used when deciding if it was
safe to free the extent while dropping snapshots.

The fix used here is to make sure the ref_mod count is unchanged
on the head ref when btrfs_update_delayed_ref is called.

Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
parent af4176b4
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment