mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 14:42:08 +02:00
btrfs: assert delayed refs lock is held at find_ref_head()
We have 3 callers for find_ref_head() so assert at find_ref_head() that we have the delayed refs lock held, removing the assertion from one of its callers (btrfs_find_delayed_ref_head()). Reviewed-by: Boris Burkov <boris@bur.io> Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
5f54384c73
commit
7226ed7d44
|
|
@ -407,6 +407,8 @@ static struct btrfs_delayed_ref_head *find_ref_head(
|
|||
struct rb_node *n;
|
||||
struct btrfs_delayed_ref_head *entry;
|
||||
|
||||
lockdep_assert_held(&dr->lock);
|
||||
|
||||
n = root->rb_node;
|
||||
entry = NULL;
|
||||
while (n) {
|
||||
|
|
@ -1195,8 +1197,6 @@ btrfs_find_delayed_ref_head(const struct btrfs_fs_info *fs_info,
|
|||
struct btrfs_delayed_ref_root *delayed_refs,
|
||||
u64 bytenr)
|
||||
{
|
||||
lockdep_assert_held(&delayed_refs->lock);
|
||||
|
||||
return find_ref_head(fs_info, delayed_refs, bytenr, false);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user