summaryrefslogtreecommitdiff
path: root/net/9p
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2009-08-13 10:26:35 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2009-08-13 10:26:35 +1000
commitd350862a420a29fa85a8261d4a55f340e1a61184 (patch)
tree6c08cbf94075e110d064576d4062c19d1e219b8c /net/9p
parent01f2fe3ab3eb92fb861de962bce80014fc542537 (diff)
virtio:add_buf-return-capacity
This API change means that virtio_net can tell how much capacity remains for buffers. It's necessarily fuzzy, since VIRTIO_RING_F_INDIRECT_DESC means we can fit any number of descriptors in one, *if* we can kmalloc. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Cc: Dinesh Subhraveti <dineshs@us.ibm.com>
Diffstat (limited to 'net/9p')
-rw-r--r--net/9p/trans_virtio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/9p/trans_virtio.c b/net/9p/trans_virtio.c
index 676db1ea23b4..4aec81010ffe 100644
--- a/net/9p/trans_virtio.c
+++ b/net/9p/trans_virtio.c
@@ -204,7 +204,7 @@ p9_virtio_request(struct p9_client *client, struct p9_req_t *req)
req->status = REQ_STATUS_SENT;
- if (chan->vq->vq_ops->add_buf(chan->vq, chan->sg, out, in, req->tc)) {
+ if (chan->vq->vq_ops->add_buf(chan->vq, chan->sg, out, in, req->tc) < 0) {
P9_DPRINTK(P9_DEBUG_TRANS,
"9p debug: virtio rpc add_buf returned failure");
return -EIO;