you've an smp race above, the smp safe implementation is this:
if (!waitqueue_active(&q->wait_for_requests[rw])) {
clear_queue_full(q, rw);
mb();
if (unlikely(waitqueue_active(&q->wait_for_requests[rw])))
wake_up(&q->wait_for_requests[rw]);
}
I'm also unsure what the "waited" logic does, it doesn't seem necessary.
Andrea
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/