From 7e4d8fb1dd67ebf3e66366598286734e59a68e29 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 5 May 2015 08:13:35 +0200 Subject: [PATCH] scst_targ: Kernel 2.6.36 build fix See also patch "scst: Rework sess_tgt_dev_list locking" (commit ID 5af7d9277ddf). Signed-off-by: Bart Van Assche --- scst/src/scst_targ.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scst/src/scst_targ.c b/scst/src/scst_targ.c index a143550de..ade36e943 100644 --- a/scst/src/scst_targ.c +++ b/scst/src/scst_targ.c @@ -4401,12 +4401,13 @@ struct scst_tgt_dev *scst_lookup_tgt_dev(struct scst_session *sess, u64 lun) struct list_head *head; struct scst_tgt_dev *tgt_dev; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32) && \ - defined(CONFIG_SCST_EXTRACHECKS) && defined(CONFIG_PREEMPT_RCU) && \ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) +#if defined(CONFIG_SCST_EXTRACHECKS) && defined(CONFIG_PREEMPT_RCU) && \ defined(CONFIG_DEBUG_LOCK_ALLOC) WARN_ON_ONCE(debug_locks && !lockdep_is_held(&sess->tgt_dev_list_mutex) && rcu_preempt_depth() == 0); +#endif #endif head = &sess->sess_tgt_dev_list[SESS_TGT_DEV_LIST_HASH_FN(lun)];