diff options
author | Filipe Manana <fdmanana@suse.com> | 2024-10-23 12:43:35 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2024-11-11 14:34:20 +0100 |
commit | 64a71f0b8a37145a387029bd8ad35b7aa864add8 (patch) | |
tree | 9f3cabf8b95981b94154f4c3291ada50ee6e66db /fs/btrfs | |
parent | 7226ed7d44eecfdf5a8406b3481a4246d49b2eba (diff) | |
download | lwn-64a71f0b8a37145a387029bd8ad35b7aa864add8.tar.gz lwn-64a71f0b8a37145a387029bd8ad35b7aa864add8.zip |
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>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/delayed-ref.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/delayed-ref.c b/fs/btrfs/delayed-ref.c index 9f8853fb9fa6..f74154c56432 100644 --- a/fs/btrfs/delayed-ref.c +++ b/fs/btrfs/delayed-ref.c @@ -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; |