summaryrefslogtreecommitdiff
path: root/fs/btrfs/delayed-ref.h
diff options
context:
space:
mode:
authorFilipe Manana <fdmanana@suse.com>2023-05-29 16:17:03 +0100
committerDavid Sterba <dsterba@suse.com>2023-06-19 13:59:31 +0200
commit1e6b71c34bbbbde920357265abd161cb727487b8 (patch)
tree2eea6433e8686452892cb8e70689adf101e761ff /fs/btrfs/delayed-ref.h
parent798f4d95db0d71a2803c61b5e1fd5b739569c3da (diff)
downloadlwn-1e6b71c34bbbbde920357265abd161cb727487b8.tar.gz
lwn-1e6b71c34bbbbde920357265abd161cb727487b8.zip
btrfs: assert correct lock is held at btrfs_select_ref_head()
The function btrfs_select_ref_head() iterates over the red black tree of delayed reference heads, which is protected by the spinlock in the delayed refs root. The function doesn't take the lock, it's taken by its single caller, btrfs_obtain_ref_head(), because it needs to call that function and btrfs_delayed_ref_lock() in the same critical section (delimited by that spinlock). So assert at btrfs_select_ref_head() that we are holding the expected lock. 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.h')
0 files changed, 0 insertions, 0 deletions