Skip to content
Snippets Groups Projects
Commit 64a71f0b authored by Filipe Manana's avatar Filipe Manana Committed by David Sterba
Browse files

btrfs: assert delayed refs lock is held at find_first_ref_head()


The delayed refs lock must be held when calling find_first_ref_head(), so
assert that it's being held.

Reviewed-by: default avatarBoris Burkov <boris@bur.io>
Reviewed-by: default avatarQu Wenruo <wqu@suse.com>
Signed-off-by: default avatarFilipe Manana <fdmanana@suse.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 7226ed7d
No related branches found
No related tags found
No related merge requests found
......@@ -384,6 +384,8 @@ static struct btrfs_delayed_ref_head *find_first_ref_head(
struct rb_node *n;
struct btrfs_delayed_ref_head *entry;
lockdep_assert_held(&dr->lock);
n = rb_first_cached(&dr->href_root);
if (!n)
return NULL;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment