[PATCH 17/30] mm/zsmalloc: Add missing annotation for zs_map_object()

From: Jules Irenge
Date: Sun Feb 23 2020 - 18:19:16 EST


Sparse reports a warning at zs_map_object()
context imbalance in zs_map_object() - wrong count at exit
The root cause is the missing annotation at zs_map_object()
Add the missing __acquires(zspage)

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

diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
index 2aa2d524a343..9d3f9b3d22aa 100644
--- a/mm/zsmalloc.c
+++ b/mm/zsmalloc.c
@@ -1290,6 +1290,7 @@ EXPORT_SYMBOL_GPL(zs_get_total_pages);
*/
void *zs_map_object(struct zs_pool *pool, unsigned long handle,
enum zs_mapmode mm)
+ __acquires(zspage)
{
struct zspage *zspage;
struct page *page;
--
2.24.1