perf record: Skip side-band event setup if HAVE_LIBBPF_SUPPORT is not set
[linux-2.6-microblaze.git] / block / blk-iocost.c
index 8ac4aad..521c29b 100644 (file)
@@ -1370,7 +1370,7 @@ static void ioc_timer_fn(struct timer_list *timer)
         * should have woken up in the last period and expire idle iocgs.
         */
        list_for_each_entry_safe(iocg, tiocg, &ioc->active_iocgs, active_list) {
-               if (!waitqueue_active(&iocg->waitq) && iocg->abs_vdebt &&
+               if (!waitqueue_active(&iocg->waitq) && !iocg->abs_vdebt &&
                    !iocg_is_idle(iocg))
                        continue;
 
@@ -2045,8 +2045,7 @@ static struct blkg_policy_data *ioc_pd_alloc(gfp_t gfp, struct request_queue *q,
        int levels = blkcg->css.cgroup->level + 1;
        struct ioc_gq *iocg;
 
-       iocg = kzalloc_node(sizeof(*iocg) + levels * sizeof(iocg->ancestors[0]),
-                           gfp, q->node);
+       iocg = kzalloc_node(struct_size(iocg, ancestors, levels), gfp, q->node);
        if (!iocg)
                return NULL;