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);