logger: fix races on queues

This commit is contained in:
Thomas Schoebel-Theuer 2017-06-05 23:18:20 +02:00 committed by Thomas Schoebel-Theuer
parent c95c478f30
commit cbb7de25fe

View File

@ -623,14 +623,10 @@ static inline
int _congested(struct trans_logger_brick *brick)
{
return
brick->q_phase[0].q_queued ||
atomic_read(&brick->q_phase[0].q_flying) ||
brick->q_phase[1].q_queued ||
atomic_read(&brick->q_phase[1].q_flying) ||
brick->q_phase[2].q_queued ||
atomic_read(&brick->q_phase[2].q_flying) ||
brick->q_phase[3].q_queued ||
atomic_read(&brick->q_phase[3].q_flying);
brick->q_phase[0].q_active ||
brick->q_phase[1].q_active ||
brick->q_phase[2].q_active ||
brick->q_phase[3].q_active;
}
////////////////// own brick / input / output operations //////////////////