aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJules Irenge <[email protected]>2020-04-06 20:08:15 -0700
committerLinus Torvalds <[email protected]>2020-04-07 10:43:41 -0700
commit31364c2e168b48c8596d4d43bad9bff70e21976b (patch)
tree4b234189c82243356dd615677242456c45b06f81
parent959a7e136d52bff429c774a4ed451b094706116b (diff)
mm/slub: add missing annotation for get_map()
Sparse reports a warning at get_map()() warning: context imbalance in get_map() - wrong count at exit The root cause is the missing annotation at get_map() Add the missing __acquires(&object_map_lock) annotation Signed-off-by: Jules Irenge <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--mm/slub.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mm/slub.c b/mm/slub.c
index 3098e0cf2899..c6d603648c79 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -449,6 +449,7 @@ static DEFINE_SPINLOCK(object_map_lock);
* not vanish from under us.
*/
static unsigned long *get_map(struct kmem_cache *s, struct page *page)
+ __acquires(&object_map_lock)
{
void *p;
void *addr = page_address(page);