Patch from Bart Van Assche <bart.vanassche@gmail.com>:

Since SCST r979 the SRP target source code does no longer compile on RHEL /
CentOS systems where OFED has been installed. This is because OFED has its
own backported versions of the 2.6.20+ workqueue API and already includes a
definition of cancel_delayed_work_sync(). The patch below makes sure that on
RHEL 5 / CentOS 5 systems with OFED 1.4 installed the SCST definition of
cancel_delayed_work_sync() does not conflict with the OFED definition of
the same function.

The patch below has been tested by verifying that the SRPT source code
compiles and runs fine on CentOS 5.3 + OFED 1.4.1 and also on a system with
a vanilla 2.6.30.4 kernel.

Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com>



git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1023 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Vladislav Bolkhovitin
2009-08-06 17:18:28 +00:00
parent b9cc1d34a2
commit 4588200994

View File

@@ -2869,7 +2869,7 @@ static inline int scst_get_in_buf_count(struct scst_cmd *cmd)
return (cmd->in_sg_cnt == 0) ? 1 : cmd->in_sg_cnt;
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 23)
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 23) && !defined(BACKPORT_LINUX_WORKQUEUE_TO_2_6_19)
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20))
static inline int cancel_delayed_work_sync(struct delayed_work *work)
#else