[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070214222824.GA11579@infradead.org>
Date: Wed, 14 Feb 2007 22:28:24 +0000
From: Christoph Hellwig <hch@...radead.org>
To: Hoang-Nam Nguyen <hnguyen@...ux.vnet.ibm.com>
Cc: Roland Dreier <rdreier@...co.com>, linux-kernel@...r.kernel.org,
linuxppc-dev@...abs.org, openib-general@...nib.org,
hch@...radead.org, raisch@...ibm.com, h.carstens@...ibm.com
Subject: Re: [PATCH 2.6.21-rc1 4/5] ehca: replace yield() by wait_for_completion()
> @@ -332,7 +333,7 @@ int ehca_destroy_cq(struct ib_cq *cq)
> spin_lock_irqsave(&ehca_cq_idr_lock, flags);
> while (my_cq->nr_callbacks) {
> spin_unlock_irqrestore(&ehca_cq_idr_lock, flags);
> - yield();
> + wait_for_completion(&my_cq->zero_callbacks);
> spin_lock_irqsave(&ehca_cq_idr_lock, flags);
> }
A while loop around wait_for_completion doesn't make all that much sense.
I suspect a simple
if (my_cq->nr_callbacks)
wait_for_completion(&my_cq->zero_callbacks);
Is what you need.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists