From d144966a53378249c0af8891cc7592b91f7edaf9 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sat, 27 Nov 2010 10:21:03 +0000 Subject: [PATCH] scst: Lock annotation corrections. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2846 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scst/src/scst_main.c b/scst/src/scst_main.c index e6eeb0a6c..9425aad68 100644 --- a/scst/src/scst_main.c +++ b/scst/src/scst_main.c @@ -713,9 +713,7 @@ int scst_suspend_activity(bool interruptible) TRACE_ENTRY(); #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) - lock_acquire(&scst_suspend_dep_map, 0/*subclass*/, true/*try*/, - 0/*exclusive*/, 2/*full validation*/, NULL/*nest_lock*/, - _RET_IP_); + mutex_acquire(&scst_suspend_dep_map, 0, 0/*try*/, _RET_IP_); #endif if (interruptible) { @@ -791,6 +789,8 @@ out: #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) if (res == 0) lock_acquired(&scst_suspend_dep_map, _RET_IP_); + else + mutex_release(&scst_suspend_dep_map, 1/*nested*/, _RET_IP_); #endif TRACE_EXIT_RES(res); @@ -811,7 +811,7 @@ static void __scst_resume_activity(void) TRACE_ENTRY(); #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) - lock_release(&scst_suspend_dep_map, false/*nested*/, _RET_IP_); + mutex_release(&scst_suspend_dep_map, 1/*nested*/, _RET_IP_); #endif suspend_count--;