diff options
author | Filipe Manana <fdmanana@suse.com> | 2024-10-23 12:48:15 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2024-11-11 14:34:20 +0100 |
commit | a8985ac6bed0546da493ebdd08238de60f0b1a04 (patch) | |
tree | 7b5bf2cc660b724ecec27abb653c1ddbcbb8e32e /fs/btrfs/delayed-ref.c | |
parent | 64a71f0b8a37145a387029bd8ad35b7aa864add8 (diff) | |
download | lwn-a8985ac6bed0546da493ebdd08238de60f0b1a04.tar.gz lwn-a8985ac6bed0546da493ebdd08238de60f0b1a04.zip |
btrfs: assert delayed refs lock is held at add_delayed_ref_head()
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>
Diffstat (limited to 'fs/btrfs/delayed-ref.c')
-rw-r--r-- | fs/btrfs/delayed-ref.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/btrfs/delayed-ref.c b/fs/btrfs/delayed-ref.c index f74154c56432..018c9765702c 100644 --- a/fs/btrfs/delayed-ref.c +++ b/fs/btrfs/delayed-ref.c @@ -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) { |