From: Jules Irenge Date: Tue, 31 Mar 2020 20:46:42 +0000 (+0100) Subject: btrfs: add missing annotation for btrfs_tree_lock() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=78d933c79cb649906577715af15400c7724ca633;p=linux.git 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: Jules Irenge Reviewed-by: David Sterba Signed-off-by: David Sterba --- diff --git a/fs/btrfs/locking.c b/fs/btrfs/locking.c index fb647d8cf5270..f75612e18a82f 100644 --- a/fs/btrfs/locking.c +++ b/fs/btrfs/locking.c @@ -410,6 +410,7 @@ void btrfs_tree_read_unlock_blocking(struct extent_buffer *eb) * The rwlock is held for write upon exit. */ void btrfs_tree_lock(struct extent_buffer *eb) + __acquires(&eb->lock) { u64 start_ns = 0;