Skip to content

Commit

Permalink
9pfs: PDU processing functions don't need to take V9fsState as argument
Browse files Browse the repository at this point in the history
V9fsState can be referenced by pdu->s. Initialise that in device
realization function.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
  • Loading branch information
Wei Liu authored and kvaneesh committed Jan 8, 2016
1 parent 2209bd0 commit ad38ce9
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 53 deletions.
1 change: 1 addition & 0 deletions hw/9pfs/virtio-9p-device.c
Expand Up @@ -69,6 +69,7 @@ static void virtio_9p_device_realize(DeviceState *dev, Error **errp)
QLIST_INIT(&s->active_list);
for (i = 0; i < (MAX_REQ - 1); i++) {
QLIST_INSERT_HEAD(&s->free_list, &s->pdus[i], next);
s->pdus[i].s = s;
}

s->vq = virtio_add_queue(vdev, MAX_REQ, handle_9p_output);
Expand Down

0 comments on commit ad38ce9

Please sign in to comment.