Skip to content

Commit

Permalink
lib: proportions.c trivial sparse lock annotation
Browse files Browse the repository at this point in the history
Suppresses sparse warning:
lib/proportions.c:159:16: warning: context imbalance in 'prop_get_global': wrong count at exit
lib/proportions.c:159:16:    context 'RCU': wanted 0, got 1
lib/proportions.c:164:2: warning: context imbalance in 'prop_put_global': unexpected unlock
lib/proportions.c:164:2:    context 'RCU': wanted 0, got -1

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Harvey Harrison authored and Linus Torvalds committed Jan 6, 2009
1 parent 8cef7d5 commit 3007967
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/proportions.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ void prop_change_shift(struct prop_descriptor *pd, int shift)
* this is used to track the active references.
*/
static struct prop_global *prop_get_global(struct prop_descriptor *pd)
__acquires(RCU)
{
int index;

Expand All @@ -160,6 +161,7 @@ static struct prop_global *prop_get_global(struct prop_descriptor *pd)
}

static void prop_put_global(struct prop_descriptor *pd, struct prop_global *pg)
__releases(RCU)
{
rcu_read_unlock();
}
Expand Down

0 comments on commit 3007967

Please sign in to comment.