{
int cpu;
struct hd_struct *part = &dm_disk(md)->part0;
+ long sum = 0;
for_each_possible_cpu(cpu) {
- if (part_stat_local_read_cpu(part, in_flight[0], cpu) ||
- part_stat_local_read_cpu(part, in_flight[1], cpu))
- return true;
+ sum += part_stat_local_read_cpu(part, in_flight[0], cpu);
+ sum += part_stat_local_read_cpu(part, in_flight[1], cpu);
}
- return false;
+ return sum != 0;
}
static void start_io_acct(struct dm_io *io)
true, duration, &io->stats_aux);
/* nudge anyone waiting on suspend queue */
- if (unlikely(waitqueue_active(&md->wait))) {
- if (!md_in_flight(md))
- wake_up(&md->wait);
- }
+ if (unlikely(waitqueue_active(&md->wait)))
+ wake_up(&md->wait);
}
/*