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 25/30] tipc: Add missing annotation for tipc_node_read_unlock()
Date
Sparse reports a warning at tipc_node_read_unlock()

warning: context imbalance in tipc_node_read_unlock - unexpected unlock

The root cause is the missing annotation at tipc_node_read_unlock()
Add the missing __releases(&n->lock) annotation

Signed-off-by: Jules Irenge <jbi.octave@gmail.com>
---
net/tipc/node.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/tipc/node.c b/net/tipc/node.c
index 4e267ed94a2a..eafa38896e3a 100644
--- a/net/tipc/node.c
+++ b/net/tipc/node.c
@@ -356,7 +356,7 @@ static void tipc_node_read_lock(struct tipc_node *n) __acquires(&n->lock)
read_lock_bh(&n->lock);
}

-static void tipc_node_read_unlock(struct tipc_node *n)
+static void tipc_node_read_unlock(struct tipc_node *n) __releases(&n->lock)
{
read_unlock_bh(&n->lock);
}
--
2.24.1
\
 
 \ /
  Last update: 2020-02-14 21:50    [W:0.098 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site