Skip to content

Commit 64a71f0

Browse files
fdmananakdave
authored andcommitted
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: 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>
1 parent 7226ed7 commit 64a71f0

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

fs/btrfs/delayed-ref.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,8 @@ static struct btrfs_delayed_ref_head *find_first_ref_head(
384384
struct rb_node *n;
385385
struct btrfs_delayed_ref_head *entry;
386386

387+
lockdep_assert_held(&dr->lock);
388+
387389
n = rb_first_cached(&dr->href_root);
388390
if (!n)
389391
return NULL;

0 commit comments

Comments
 (0)