Skip to content

Commit

Permalink
mm/zsmalloc: add missing annotation for unpin_tag()
Browse files Browse the repository at this point in the history
Sparse reports a warning at unpin_tag()()

warning: context imbalance in unpin_tag() - unexpected unlock

The root cause is the missing annotation at unpin_tag()
Add the missing __releases(bitlock) annotation

Signed-off-by: Jules Irenge <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Acked-by: Minchan Kim <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
irenge authored and torvalds committed Apr 7, 2020
1 parent 70c7ec9 commit bc22b18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/zsmalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@ static void pin_tag(unsigned long handle) __acquires(bitlock)
bit_spin_lock(HANDLE_PIN_BIT, (unsigned long *)handle);
}

static void unpin_tag(unsigned long handle)
static void unpin_tag(unsigned long handle) __releases(bitlock)
{
bit_spin_unlock(HANDLE_PIN_BIT, (unsigned long *)handle);
}
Expand Down

0 comments on commit bc22b18

Please sign in to comment.