[11/30] mm/zsmalloc: Add missing annotation for migrate_read_unlock()
diff mbox series

Message ID 20200214204741.94112-12-jbi.octave@gmail.com
State New
Headers show
Series
  • Untitled series #241855
Related show

Commit Message

Jules Irenge Feb. 14, 2020, 8:47 p.m. UTC
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 <jbi.octave@gmail.com>
---
 mm/zsmalloc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Minchan Kim Feb. 27, 2020, 9:54 p.m. UTC | #1
On Fri, Feb 14, 2020 at 08:47:22PM +0000, Jules Irenge wrote:
> 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 <jbi.octave@gmail.com>
Acked-by: Minchan Kim <minchan@kernel.org>

Patch
diff mbox series

diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index da70817b4ed8..2eab424c8c67 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);
 }