Skip to content
Commit b939d1ab authored by Josef Bacik's avatar Josef Bacik Committed by Chris Mason
Browse files

Btrfs: fix locking in btrfs_destroy_delayed_refs



The transaction abort stuff was throwing warnings from the list debugging
code because we do a list_del_init outside of the delayed_refs spin lock.
The delayed refs locking makes baby Jesus cry so it's not hard to get wrong,
but we need to take the ref head mutex to make sure it's not being processed
currently, and so if it is we need to drop the spin lock and then take and
drop the mutex and do the search again.  If we can take the mutex then we
can safely remove the head from the list and carry on.  Now when the
transaction aborts I don't get the list debugging warnings.  Thanks,

Signed-off-by: default avatarJosef Bacik <josef@redhat.com>
parent beb42dd7
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