diff mbox series

[5/7] btrfs: Add missing annotation for btrfs_lock_cluster()

Message ID 20200331204643.11262-6-jbi.octave@gmail.com (mailing list archive)
State New, archived
Headers show
Series None | expand

Commit Message

Jules Irenge March 31, 2020, 8:46 p.m. UTC
Sparse reports a warning at btrfs_lock_cluster()

warning: context imbalance in btrfs_lock_cluster()
	- wrong count

The root cause is the missing annotation at btrfs_lock_cluster()
Add the missing __acquires(&cluster->refill_lock) annotation.

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

Comments

David Sterba April 1, 2020, 3:57 p.m. UTC | #1
On Tue, Mar 31, 2020 at 09:46:41PM +0100, Jules Irenge wrote:
> Sparse reports a warning at btrfs_lock_cluster()
> 
> warning: context imbalance in btrfs_lock_cluster()
> 	- wrong count
> 
> The root cause is the missing annotation at btrfs_lock_cluster()
> Add the missing __acquires(&cluster->refill_lock) annotation.
> 
> Signed-off-by: Jules Irenge <jbi.octave@gmail.com>

Thanks, I'll add it to devel queue.
diff mbox series

Patch

diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index 0163fdd59f8f..9057a5ca6678 100644
--- a/fs/btrfs/extent-tree.c
+++ b/fs/btrfs/extent-tree.c
@@ -3395,6 +3395,7 @@  static struct btrfs_block_group *btrfs_lock_cluster(
 		   struct btrfs_block_group *block_group,
 		   struct btrfs_free_cluster *cluster,
 		   int delalloc)
+	__acquires(&cluster->refill_lock)
 {
 	struct btrfs_block_group *used_bg = NULL;