[net/9p] Set the condition just before waking up.
authorVenkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>
Mon, 14 Mar 2011 21:12:49 +0000 (14:12 -0700)
committerEric Van Hensbergen <ericvh@gmail.com>
Tue, 22 Mar 2011 21:32:47 +0000 (16:32 -0500)
Given that the sprious wake-ups are common, we need to move the
condition setting right next to the wake_up().  After setting the condition
to req->status = REQ_STATUS_RCVD, sprious wakeups may cause the
virtqueue back on the free list for someone else to use.
This may result in kernel panic while relasing the pinned pages
in p9_release_req_pages().

Also rearranged the while loop in req_done() for better redability.

Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
net/9p/trans_virtio.c

Simple merge