From 8a374cccee8cdfa2902bb7a07a10671ffc1a72c1 Mon Sep 17 00:00:00 2001 From: Jules Irenge Date: Mon, 6 Apr 2020 20:08:24 -0700 Subject: [PATCH] mm/zsmalloc: add missing annotation for migrate_read_unlock() Sparse reports a warning at migrate_read_unlock()() warning: context imbalance in migrate_read_unlock() - unexpected unlock The root cause is the missing annotation at migrate_read_unlock() Add the missing __releases(&zspage->lock) annotation Signed-off-by: Jules Irenge Signed-off-by: Andrew Morton Acked-by: Minchan Kim Link: http://lkml.kernel.org/r/20200214204741.94112-12-jbi.octave@gmail.com Signed-off-by: Linus Torvalds --- mm/zsmalloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index da70817..2eab424 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c @@ -1838,7 +1838,7 @@ static void migrate_read_lock(struct zspage *zspage) __acquires(&zspage->lock) read_lock(&zspage->lock); } -static void migrate_read_unlock(struct zspage *zspage) +static void migrate_read_unlock(struct zspage *zspage) __releases(&zspage->lock) { read_unlock(&zspage->lock); } -- 2.7.4