diff mbox series

[01/30] btrfs: Add missing annotation for release_extent_buffer()

Message ID 20200223231711.157699-2-jbi.octave@gmail.com (mailing list archive)
State New, archived
Headers show
Series [01/30] btrfs: Add missing annotation for release_extent_buffer() | expand

Commit Message

Jules Irenge Feb. 23, 2020, 11:16 p.m. UTC
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

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
 fs/btrfs/extent_io.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Nikolay Borisov Feb. 23, 2020, 11:27 p.m. UTC | #1
On 24.02.20 г. 1:16 ч., Jules Irenge wrote:
> 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
> 
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>

 Reviewed-by: Nikolay Borisov <nborisov@suse.com>
David Sterba Feb. 24, 2020, 3:19 p.m. UTC | #2
On Sun, Feb 23, 2020 at 11:16:42PM +0000, Jules Irenge wrote:
> 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
> 
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>

Added to misc-next, thanks.
diff mbox series

Patch

diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index c0f202741e09..8b6d6893e7a7 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -5230,6 +5230,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);