Commit 78d933c7 authored by Jules Irenge's avatar Jules Irenge Committed by David Sterba

btrfs: add missing annotation for btrfs_tree_lock()

Sparse reports a warning at btrfs_tree_lock()

warning: context imbalance in btrfs_tree_lock() - wrong count at exit

The root cause is the missing annotation at btrfs_tree_lock()
Add the missing __acquires(&eb->lock) annotation
Signed-off-by: default avatarJules Irenge <jbi.octave@gmail.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent c142c6a4
...@@ -410,6 +410,7 @@ void btrfs_tree_read_unlock_blocking(struct extent_buffer *eb) ...@@ -410,6 +410,7 @@ void btrfs_tree_read_unlock_blocking(struct extent_buffer *eb)
* The rwlock is held for write upon exit. * The rwlock is held for write upon exit.
*/ */
void btrfs_tree_lock(struct extent_buffer *eb) void btrfs_tree_lock(struct extent_buffer *eb)
__acquires(&eb->lock)
{ {
u64 start_ns = 0; u64 start_ns = 0;
......
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