Commit a4666e68 authored by David Sterba's avatar David Sterba

btrfs: use lockdep_assert_held for spinlocks

Using lockdep_assert_held is preferred, replace assert_spin_locked.
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 581c1760
...@@ -216,7 +216,7 @@ int btrfs_delayed_ref_lock(struct btrfs_trans_handle *trans, ...@@ -216,7 +216,7 @@ int btrfs_delayed_ref_lock(struct btrfs_trans_handle *trans,
struct btrfs_delayed_ref_root *delayed_refs; struct btrfs_delayed_ref_root *delayed_refs;
delayed_refs = &trans->transaction->delayed_refs; delayed_refs = &trans->transaction->delayed_refs;
assert_spin_locked(&delayed_refs->lock); lockdep_assert_held(&delayed_refs->lock);
if (mutex_trylock(&head->mutex)) if (mutex_trylock(&head->mutex))
return 0; return 0;
...@@ -239,7 +239,7 @@ static inline void drop_delayed_ref(struct btrfs_trans_handle *trans, ...@@ -239,7 +239,7 @@ static inline void drop_delayed_ref(struct btrfs_trans_handle *trans,
struct btrfs_delayed_ref_head *head, struct btrfs_delayed_ref_head *head,
struct btrfs_delayed_ref_node *ref) struct btrfs_delayed_ref_node *ref)
{ {
assert_spin_locked(&head->lock); lockdep_assert_held(&head->lock);
rb_erase(&ref->ref_node, &head->ref_tree); rb_erase(&ref->ref_node, &head->ref_tree);
RB_CLEAR_NODE(&ref->ref_node); RB_CLEAR_NODE(&ref->ref_node);
if (!list_empty(&ref->add_list)) if (!list_empty(&ref->add_list))
...@@ -307,7 +307,7 @@ void btrfs_merge_delayed_refs(struct btrfs_trans_handle *trans, ...@@ -307,7 +307,7 @@ void btrfs_merge_delayed_refs(struct btrfs_trans_handle *trans,
struct rb_node *node; struct rb_node *node;
u64 seq = 0; u64 seq = 0;
assert_spin_locked(&head->lock); lockdep_assert_held(&head->lock);
if (RB_EMPTY_ROOT(&head->ref_tree)) if (RB_EMPTY_ROOT(&head->ref_tree))
return; return;
......
...@@ -1484,7 +1484,7 @@ int btrfs_qgroup_trace_extent_nolock(struct btrfs_fs_info *fs_info, ...@@ -1484,7 +1484,7 @@ int btrfs_qgroup_trace_extent_nolock(struct btrfs_fs_info *fs_info,
struct btrfs_qgroup_extent_record *entry; struct btrfs_qgroup_extent_record *entry;
u64 bytenr = record->bytenr; u64 bytenr = record->bytenr;
assert_spin_locked(&delayed_refs->lock); lockdep_assert_held(&delayed_refs->lock);
trace_btrfs_qgroup_trace_extent(fs_info, record); trace_btrfs_qgroup_trace_extent(fs_info, record);
while (*p) { while (*p) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment