From 669f39b29c127c6a97e2341c4c7396bec34c604d Mon Sep 17 00:00:00 2001 From: Ryan Stone Date: Fri, 2 Dec 2016 15:38:34 +0000 Subject: [PATCH] Revert r309372 The bug intended to be fixed by r309372 was already addressed by r296178, so revert my change. Reported by: seph --- sys/sys/buf_ring.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/sys/sys/buf_ring.h b/sys/sys/buf_ring.h index fae6a082ab4..234e318ecf1 100644 --- a/sys/sys/buf_ring.h +++ b/sys/sys/buf_ring.h @@ -67,13 +67,11 @@ buf_ring_enqueue(struct buf_ring *br, void *buf) uint32_t prod_head, prod_next, cons_tail; #ifdef DEBUG_BUFRING int i; - if (br->br_cons_head != br->br_prod_head) { - for (i = (br->br_cons_head + 1) & br->br_cons_mask; i != br->br_prod_head; - i = ((i + 1) & br->br_cons_mask)) - if(br->br_ring[i] == buf) - panic("buf=%p already enqueue at %d prod=%d cons=%d", - buf, i, br->br_prod_tail, br->br_cons_tail); - } + for (i = br->br_cons_head; i != br->br_prod_head; + i = ((i + 1) & br->br_cons_mask)) + if(br->br_ring[i] == buf) + panic("buf=%p already enqueue at %d prod=%d cons=%d", + buf, i, br->br_prod_tail, br->br_cons_tail); #endif critical_enter(); do {