提交 30079677 编写于 作者: H Harvey Harrison 提交者: Linus Torvalds

lib: proportions.c trivial sparse lock annotation

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: NHarvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 8cef7d57
...@@ -147,6 +147,7 @@ void prop_change_shift(struct prop_descriptor *pd, int shift) ...@@ -147,6 +147,7 @@ void prop_change_shift(struct prop_descriptor *pd, int shift)
* this is used to track the active references. * this is used to track the active references.
*/ */
static struct prop_global *prop_get_global(struct prop_descriptor *pd) static struct prop_global *prop_get_global(struct prop_descriptor *pd)
__acquires(RCU)
{ {
int index; int index;
...@@ -160,6 +161,7 @@ static struct prop_global *prop_get_global(struct prop_descriptor *pd) ...@@ -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) static void prop_put_global(struct prop_descriptor *pd, struct prop_global *pg)
__releases(RCU)
{ {
rcu_read_unlock(); rcu_read_unlock();
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册