From f9cbfe51cdb57b6eb553e7f4b142b6390e88a688 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Tue, 3 May 2011 21:27:30 +0000 Subject: [PATCH] RHEL5/6 workaround git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3438 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/kernel/nthread.c | 4 ++-- scst/src/scst_main.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/iscsi-scst/kernel/nthread.c b/iscsi-scst/kernel/nthread.c index 76fc7f6b9..bfc920bbe 100644 --- a/iscsi-scst/kernel/nthread.c +++ b/iscsi-scst/kernel/nthread.c @@ -1076,7 +1076,7 @@ int istrd(void *arg) PRINT_INFO("Read thread for pool %p started, PID %d", p, current->pid); current->flags |= PF_NOFREEZE; -#ifdef RHEL_MAJOR +#if defined(RHEL_MAJOR) && RHEL_MAJOR -0 <= 5 rc = set_cpus_allowed(current, p->cpu_mask); #else rc = set_cpus_allowed_ptr(current, &p->cpu_mask); @@ -1847,7 +1847,7 @@ int istwr(void *arg) PRINT_INFO("Write thread for pool %p started, PID %d", p, current->pid); current->flags |= PF_NOFREEZE; -#ifdef RHEL_MAJOR +#if defined(RHEL_MAJOR) && RHEL_MAJOR -0 <= 5 rc = set_cpus_allowed(current, p->cpu_mask); #else rc = set_cpus_allowed_ptr(current, &p->cpu_mask); diff --git a/scst/src/scst_main.c b/scst/src/scst_main.c index e30ddead7..98706b692 100644 --- a/scst/src/scst_main.c +++ b/scst/src/scst_main.c @@ -1630,7 +1630,7 @@ int scst_add_threads(struct scst_cmd_threads *cmd_threads, * sess->acg can be NULL here, if called from * scst_check_reassign_sess()! */ -#ifdef RHEL_MAJOR +#if defined(RHEL_MAJOR) && RHEL_MAJOR -0 <= 5 rc = set_cpus_allowed(thr->cmd_thread, tgt_dev->acg_dev->acg->acg_cpu_mask); #else