Whamcloud - gitweb
LU-3992 libcfs: Fix NUMA emulated mode
[fs/lustre-release.git] / libcfs / libcfs / linux / linux-cpu.c
index eea82ee..18bbcfb 100644 (file)
@@ -814,8 +814,12 @@ cfs_cpt_table_create(int ncpt)
                        struct cfs_cpu_partition *part;
                        int    n;
 
-                       if (cpt >= ncpt)
-                               goto failed;
+                       /* Each emulated NUMA node has all allowed CPUs in
+                        * the mask.
+                        * End loop when all partitions have assigned CPUs.
+                        */
+                       if (cpt == ncpt)
+                               break;
 
                        part = &cptab->ctb_parts[cpt];