diff mbox

[V9fs-developer,net/9p] Unconditional wake_up to processes waiting for space on VirtIO ring.

Message ID 1299795183-2564-1-git-send-email-jvrao@linux.vnet.ibm.com (mailing list archive)
State Accepted, archived
Delegated to: Eric Van Hensbergen
Headers show

Commit Message

jvrao March 10, 2011, 10:13 p.m. UTC
None
diff mbox

Patch

diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c
index 9b550ed..961e025 100644
--- a/net/9p/trans_virtio.c
+++ b/net/9p/trans_virtio.c
@@ -146,11 +146,10 @@  static void req_done(struct virtqueue *vq)
 		rc = virtqueue_get_buf(chan->vq, &len);
 
 		if (rc != NULL) {
-			if (!chan->ring_bufs_avail) {
-				chan->ring_bufs_avail = 1;
-				wake_up(chan->vc_wq);
-			}
+			chan->ring_bufs_avail = 1;
 			spin_unlock_irqrestore(&chan->lock, flags);
+			/* Wakeup if anyone waiting for VirtIO ring space. */
+			wake_up(chan->vc_wq);
 			P9_DPRINTK(P9_DEBUG_TRANS, ": rc %p\n", rc);
 			P9_DPRINTK(P9_DEBUG_TRANS, ": lookup tag %d\n",
 					rc->tag);