From 2b1490584cb0f9d3714c8ec0ecd51ace9d6cd195 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Thu, 14 Oct 2010 14:32:00 +0000 Subject: [PATCH] Merge of r2395 by Bart Van Assche : The kernel module iscsi_scst loads again on RHEL 5 (Fixed "iscsi_scst: Unknown symbol set_cpus_allowed_ptr"). git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2406 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- iscsi-scst/kernel/nthread.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/iscsi-scst/kernel/nthread.c b/iscsi-scst/kernel/nthread.c index 6a6501a05..48a9d61aa 100644 --- a/iscsi-scst/kernel/nthread.c +++ b/iscsi-scst/kernel/nthread.c @@ -1073,7 +1073,11 @@ int istrd(void *arg) PRINT_INFO("Read thread for pool %p started, PID %d", p, current->pid); current->flags |= PF_NOFREEZE; +#ifdef RHEL_MAJOR + rc = set_cpus_allowed(current, p->cpu_mask); +#else rc = set_cpus_allowed_ptr(current, &p->cpu_mask); +#endif if (rc != 0) PRINT_ERROR("Setting CPU affinity failed: %d", rc); @@ -1807,7 +1811,11 @@ int istwr(void *arg) PRINT_INFO("Write thread for pool %p started, PID %d", p, current->pid); current->flags |= PF_NOFREEZE; +#ifdef RHEL_MAJOR + rc = set_cpus_allowed(current, p->cpu_mask); +#else rc = set_cpus_allowed_ptr(current, &p->cpu_mask); +#endif if (rc != 0) PRINT_ERROR("Setting CPU affinity failed: %d", rc);