Messages in this thread Patch in this message | | | From | Marc-Christian Petersen <> | Subject | Re: 2.4.20: Proccess stuck in __lock_page ... | Date | Wed, 28 May 2003 13:17:59 +0200 |
| |
On Wednesday 28 May 2003 12:59, Andrew Morton wrote:
Hi Andrew,
> umm, I'd like confirmation of that. > > The waitqueue_active() test is wrong because of a missing barrier, but only > on SMP. And if it does make a mistake it will surely correct itself when > the next request is put back. (That's why I left it there...) > More testing, please. Does the attached one make sense?
ciao, Marc
--- old/drivers/block/ll_rw_blk.c 2003-05-14 23:11:08.000000000 +0200 +++ new/drivers/block/ll_rw_blk.c 2003-05-28 13:04:34.000000000 +0200 @@ -829,9 +829,10 @@ void blkdev_release_request(struct reque */ if (q) { list_add(&req->queue, &q->rq[rw].free); - if (++q->rq[rw].count >= q->batch_requests && - waitqueue_active(&q->wait_for_requests[rw])) + if (++q->rq[rw].count >= q->batch_requests) { + smp_mb(); wake_up(&q->wait_for_requests[rw]); + } } } | |