diff options
author | Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com> | 2011-03-08 18:34:20 -0500 |
---|---|---|
committer | Eric Van Hensbergen <ericvh@gmail.com> | 2011-03-22 17:32:19 -0400 |
commit | 53bda3e5b4e91763224ecb7d05dab94d281fd41d (patch) | |
tree | 0e21d7fd11ff058a9deb37dee53eac68ad42f727 /net/9p | |
parent | 42869c8adae72366fc6c4f3924ce3d6c3735c4a3 (diff) |
[net/9p] unconditional wake_up to proc waiting for space on VirtIO ring
Process may wait to get space on VirtIO ring to send a transaction to
VirtFS server. Current code just does a conditional wake_up() which
means only one process will be woken up even if multiple processes
are waiting.
This fix makes the wake_up unconditional. Hence we won't have any
processes waiting for-ever.
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'net/9p')
-rw-r--r-- | net/9p/trans_virtio.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c index 9b550ed9c711..961e025957ae 100644 --- a/net/9p/trans_virtio.c +++ b/net/9p/trans_virtio.c | |||
@@ -146,11 +146,10 @@ static void req_done(struct virtqueue *vq) | |||
146 | rc = virtqueue_get_buf(chan->vq, &len); | 146 | rc = virtqueue_get_buf(chan->vq, &len); |
147 | 147 | ||
148 | if (rc != NULL) { | 148 | if (rc != NULL) { |
149 | if (!chan->ring_bufs_avail) { | 149 | chan->ring_bufs_avail = 1; |
150 | chan->ring_bufs_avail = 1; | ||
151 | wake_up(chan->vc_wq); | ||
152 | } | ||
153 | spin_unlock_irqrestore(&chan->lock, flags); | 150 | spin_unlock_irqrestore(&chan->lock, flags); |
151 | /* Wakeup if anyone waiting for VirtIO ring space. */ | ||
152 | wake_up(chan->vc_wq); | ||
154 | P9_DPRINTK(P9_DEBUG_TRANS, ": rc %p\n", rc); | 153 | P9_DPRINTK(P9_DEBUG_TRANS, ": rc %p\n", rc); |
155 | P9_DPRINTK(P9_DEBUG_TRANS, ": lookup tag %d\n", | 154 | P9_DPRINTK(P9_DEBUG_TRANS, ": lookup tag %d\n", |
156 | rc->tag); | 155 | rc->tag); |