lkml.org 
[lkml]   [2020]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 04/30] mm/memcontrol: Add missing annotation for lock_page_lru()
Date
Sparse reports warning at lock_page_lry()

warning: context imbalance in lock_page_lru() - wrong count at exit

The root cause is the missing annotation at lock_page_lru()
Add the missing __acquires(&pgdat->lru_lock)

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
mm/memcontrol.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 22ddd557a69b..67dc9f1af0bf 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -2571,6 +2571,7 @@ static void cancel_charge(struct mem_cgroup *memcg, unsigned int nr_pages)
}

static void lock_page_lru(struct page *page, int *isolated)
+ __acquires(&pgdat->lru_lock)
{
pg_data_t *pgdat = page_pgdat(page);

--
2.24.1
\
 
 \ /
  Last update: 2020-02-14 21:49    [W:0.117 / U:4.740 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site