OSDN Git Service

btrfs: Add missing lock annotation for release_extent_buffer()
authorJules Irenge <jbi.octave@gmail.com>
Sun, 23 Feb 2020 23:16:42 +0000 (23:16 +0000)
committerDavid Sterba <dsterba@suse.com>
Mon, 23 Mar 2020 16:01:42 +0000 (17:01 +0100)
Sparse reports a warning at release_extent_buffer()
warning: context imbalance in release_extent_buffer() - unexpected unlock

The root cause is the missing annotation at release_extent_buffer()
Add the missing __releases(&eb->refs_lock) annotation

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_io.c

index 4f4b41c..14b7007 100644 (file)
@@ -5276,6 +5276,7 @@ static inline void btrfs_release_extent_buffer_rcu(struct rcu_head *head)
 }
 
 static int release_extent_buffer(struct extent_buffer *eb)
+       __releases(&eb->refs_lock)
 {
        lockdep_assert_held(&eb->refs_lock);