Whamcloud - gitweb
LU-6285 ptlrpc: Get rid of cpus_* calls as deprecated 25/13925/2
authorOleg Drokin <oleg.drokin@intel.com>
Mon, 2 Mar 2015 06:07:07 +0000 (01:07 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 6 Apr 2015 04:39:43 +0000 (04:39 +0000)
Use cpumask_* equivalents instead.
Also we are no longer supposed to directly assign cpumasks as a method
of copy, need to use cpumask_copy instead.

Change-Id: I0425cd308a363e74de8d20f9a5f144fe07431f01
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Reviewed-on: http://review.whamcloud.com/13925
Tested-by: Jenkins
Reviewed-by: Patrick Farrell <paf@cray.com>
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
lustre/ptlrpc/ptlrpcd.c

index 1471d2c..e4f89eb 100644 (file)
@@ -518,10 +518,10 @@ static int ptlrpcd_bind(int index, int max)
 #if defined(CONFIG_NUMA)
        {
                int i;
-               mask = *cpumask_of_node(cpu_to_node(index));
+               cpumask_copy(&mask, cpumask_of_node(cpu_to_node(index)));
                for (i = max; i < num_online_cpus(); i++)
-                       cpu_clear(i, mask);
-               pc->pc_npartners = cpus_weight(mask) - 1;
+                       cpumask_clear_cpu(i, &mask);
+               pc->pc_npartners = cpumask_weight(&mask) - 1;
                set_bit(LIOD_BIND, &pc->pc_flags);
        }
 #else
@@ -561,7 +561,7 @@ static int ptlrpcd_bind(int index, int max)
                                 * that are already initialized
                                 */
                                for (pidx = 0, i = 0; i < index; i++) {
-                                       if (cpu_isset(i, mask)) {
+                                       if (cpumask_test_cpu(i, &mask)) {
                                                ppc = &ptlrpcds->pd_threads[i];
                                                pc->pc_partners[pidx++] = ppc;
                                                ppc->pc_partners[ppc->