static struct vperfctr *get_empty_vperfctr(void) { struct vperfctr *perfctr = vperfctr_alloc(); if (!IS_ERR(perfctr)) { atomic_set(&perfctr->count, 1); spin_lock_init(&perfctr->owner_lock); spin_lock_init(&perfctr->children_lock); } return perfctr; }
static struct vperfctr *get_empty_vperfctr(void) { struct vperfctr *perfctr = vperfctr_alloc(); if (!IS_ERR(perfctr)) { atomic_set(&perfctr->count, 1); vperfctr_init_bad_cpus_allowed(perfctr); vperfctr_init_cpumask(perfctr); spin_lock_init(&perfctr->owner_lock); debug_init(perfctr); } return perfctr; }