public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: lustre: Fix 'unexpected unlock' warning generated by sparse
@ 2016-01-03  2:57 Niranjan Dighe
  2016-02-03 22:23 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 3+ messages in thread
From: Niranjan Dighe @ 2016-01-03  2:57 UTC (permalink / raw)
  To: Oleg Drokin, Andreas Dilger, Greg Kroah-Hartman, Mike Rapoport,
	Jeremiah Mahler, James Simmons, Haneen Mohammed, Mike Shuey,
	Arnd Bergmann, Al Viro
  Cc: lustre-devel, devel, linux-kernel

Added annotation '__must_hold' to function ksocknal_send_keepalive_locked
which unlocks the lock ksocknal_data.ksnd_global_lock. As this lock is
not acquired in the current function, sparse warns about context imbalance

Signed-off-by: Niranjan Dighe <niranjan.dighe@gmail.com>
---
 drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c
index 477b385..29525a0 100644
--- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c
+++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c
@@ -2336,6 +2336,7 @@ ksocknal_flush_stale_txs(ksock_peer_t *peer)
 
 static int
 ksocknal_send_keepalive_locked(ksock_peer_t *peer)
+__must_hold(&ksocknal_data.ksnd_global_lock)
 {
 	ksock_sched_t *sched;
 	ksock_conn_t *conn;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-02-07  9:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-03  2:57 [PATCH] staging: lustre: Fix 'unexpected unlock' warning generated by sparse Niranjan Dighe
2016-02-03 22:23 ` Greg Kroah-Hartman
2016-02-07  9:00   ` Niranjan Dighe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox