Skip to content

Commit

Permalink
btrfs: assert delayed refs lock is held at add_delayed_ref_head()
Browse files Browse the repository at this point in the history
The delayed refs lock must be held when calling add_delayed_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>
  • Loading branch information
fdmanana authored and kdave committed Nov 11, 2024
1 parent 64a71f0 commit a8985ac
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/btrfs/delayed-ref.c
Original file line number Diff line number Diff line change
Expand Up @@ -886,6 +886,7 @@ add_delayed_ref_head(struct btrfs_trans_handle *trans,
bool qrecord_inserted = false;

delayed_refs = &trans->transaction->delayed_refs;
lockdep_assert_held(&delayed_refs->lock);

/* Record qgroup extent info if provided */
if (qrecord) {
Expand Down

0 comments on commit a8985ac

Please sign in to comment.