docs: Fix some broken references
[sfrench/cifs-2.6.git] / kernel / cgroup / cpuset.c
index b42037e6e81d3af0eb8a2d8c5cbdf4bbd56e5824..266f10cb7222b558aca0a777206d7bc747912750 100644 (file)
@@ -605,7 +605,7 @@ static inline int nr_cpusets(void)
  * load balancing domains (sched domains) as specified by that partial
  * partition.
  *
- * See "What is sched_load_balance" in Documentation/cgroups/cpusets.txt
+ * See "What is sched_load_balance" in Documentation/cgroup-v1/cpusets.txt
  * for a background explanation of this.
  *
  * Does not return errors, on the theory that the callers of this
@@ -683,7 +683,7 @@ static int generate_sched_domains(cpumask_var_t **domains,
                goto done;
        }
 
-       csa = kmalloc(nr_cpusets() * sizeof(cp), GFP_KERNEL);
+       csa = kmalloc_array(nr_cpusets(), sizeof(cp), GFP_KERNEL);
        if (!csa)
                goto done;
        csn = 0;
@@ -753,7 +753,8 @@ restart:
         * The rest of the code, including the scheduler, can deal with
         * dattr==NULL case. No need to abort if alloc fails.
         */
-       dattr = kmalloc(ndoms * sizeof(struct sched_domain_attr), GFP_KERNEL);
+       dattr = kmalloc_array(ndoms, sizeof(struct sched_domain_attr),
+                             GFP_KERNEL);
 
        for (nslot = 0, i = 0; i < csn; i++) {
                struct cpuset *a = csa[i];