lkml.org 
[lkml]   [2014]   [Dec]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3/5] staging: lustre: selftest: fix sfw_deactivate_session context imbalance
Date
Fix the sparse warning about a context imbalance in the
sfw_deactivate_session function by telling sparse that it
should expect the lock to be held on entry and held on exit.

drivers/staging/lustre/lnet/selftest/framework.c:210:9: warning: context imbalance in 'sfw_deactivate_session' - unexpected unlock

Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>
---
drivers/staging/lustre/lnet/selftest/framework.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lnet/selftest/framework.c b/drivers/staging/lustre/lnet/selftest/framework.c
index 56b4ef4..5709148 100644
--- a/drivers/staging/lustre/lnet/selftest/framework.c
+++ b/drivers/staging/lustre/lnet/selftest/framework.c
@@ -194,9 +194,9 @@ sfw_del_session_timer (void)
return EBUSY; /* racing with sfw_session_expired() */
}

-/* called with sfw_data.fw_lock held */
static void
sfw_deactivate_session (void)
+ __must_hold(&sfw_data.fw_lock)
{
sfw_session_t *sn = sfw_data.fw_session;
int nactive = 0;
--
2.1.4


\
 
 \ /
  Last update: 2014-12-27 22:21    [W:0.031 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site