From 38bb4e997e702030caa7206fd78856b101b1ba94 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Thu, 30 Aug 2012 20:39:08 +0000 Subject: [PATCH] debug_locks not exported on RHEL 6.x, which prevents SCST be used on them, if CONFIG_DEBUG_LOCK_ALLOC set. Hopefully, debug_locks exported on RHEL 6.4+. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4500 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/scst.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scst/include/scst.h b/scst/include/scst.h index acaafa4a0..9ec5c8016 100644 --- a/scst/include/scst.h +++ b/scst/include/scst.h @@ -3995,10 +3995,18 @@ static inline int cancel_delayed_work_sync(struct delayed_work *work) #endif #endif +#ifndef RHEL_RELEASE_VERSION +#define RHEL_RELEASE_VERSION(maj, min) 0 +#endif + #ifdef CONFIG_DEBUG_LOCK_ALLOC extern struct lockdep_map scst_suspend_dep_map; -#define scst_assert_activity_suspended() \ +#if !defined(RHEL_RELEASE_CODE) || (RHEL_RELEASE_CODE -0 < RHEL_RELEASE_VERSION(6, 4)) +# define scst_assert_activity_suspended() \ WARN_ON(debug_locks && !lock_is_held(&scst_suspend_dep_map)); +# else +# define scst_assert_activity_suspended() do { } while (0) +# endif #else #define scst_assert_activity_suspended() do { } while (0) #endif