summaryrefslogtreecommitdiffstats
path: root/mm/zsmalloc.c
diff options
context:
space:
mode:
authorJules Irenge <jbi.octave@gmail.com>2020-04-07 05:08:21 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2020-04-07 19:43:41 +0200
commitcfc451cfdf1dde36eada652a4b16d9b1524c5932 (patch)
tree0d9184d8d9a7b9b80d91b6a1831d95867889f36e /mm/zsmalloc.c
parentmm/slub: add missing annotation for put_map() (diff)
downloadlinux-cfc451cfdf1dde36eada652a4b16d9b1524c5932.tar.xz
linux-cfc451cfdf1dde36eada652a4b16d9b1524c5932.zip
mm/zsmalloc: add missing annotation for migrate_read_lock()
Sparse reports a warning at migrate_read_lock()() warning: context imbalance in migrate_read_lock() - wrong count at exit The root cause is the missing annotation at migrate_read_lock() Add the missing __acquires(&zspage->lock) annotation Signed-off-by: Jules Irenge <jbi.octave@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Minchan Kim <minchan@kernel.org> Link: http://lkml.kernel.org/r/20200214204741.94112-11-jbi.octave@gmail.com Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/zsmalloc.c')
-rw-r--r--mm/zsmalloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index 22d17ecfe7df..da70817b4ed8 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -1833,7 +1833,7 @@ static void migrate_lock_init(struct zspage *zspage)
rwlock_init(&zspage->lock);
}
-static void migrate_read_lock(struct zspage *zspage)
+static void migrate_read_lock(struct zspage *zspage) __acquires(&zspage->lock)
{
read_lock(&zspage->lock);
}