Lines Matching refs:node
244 llist_add(&work->node, &worker->work_list); in vhost_worker_queue()
395 struct llist_node *node; in vhost_run_work_list() local
397 node = llist_del_all(&worker->work_list); in vhost_run_work_list()
398 if (node) { in vhost_run_work_list()
401 node = llist_reverse_order(node); in vhost_run_work_list()
404 llist_for_each_entry_safe(work, work_next, node, node) { in vhost_run_work_list()
413 return !!node; in vhost_run_work_list()
1009 struct vhost_msg_node *node, *n; in vhost_clear_msg() local
1013 list_for_each_entry_safe(node, n, &dev->read_list, node) { in vhost_clear_msg()
1014 list_del(&node->node); in vhost_clear_msg()
1015 kfree(node); in vhost_clear_msg()
1018 list_for_each_entry_safe(node, n, &dev->pending_list, node) { in vhost_clear_msg()
1019 list_del(&node->node); in vhost_clear_msg()
1020 kfree(node); in vhost_clear_msg()
1415 struct vhost_msg_node *node, *n; in vhost_iotlb_notify_vq() local
1419 list_for_each_entry_safe(node, n, &d->pending_list, node) { in vhost_iotlb_notify_vq()
1420 struct vhost_iotlb_msg *vq_msg = &node->msg.iotlb; in vhost_iotlb_notify_vq()
1424 vhost_poll_queue(&node->vq->poll); in vhost_iotlb_notify_vq()
1425 list_del(&node->node); in vhost_iotlb_notify_vq()
1426 kfree(node); in vhost_iotlb_notify_vq()
1582 struct vhost_msg_node *node; in vhost_chr_read_iter() local
1594 node = vhost_dequeue_msg(dev, &dev->read_list); in vhost_chr_read_iter()
1595 if (node) in vhost_chr_read_iter()
1616 if (node) { in vhost_chr_read_iter()
1618 void *start = &node->msg; in vhost_chr_read_iter()
1620 switch (node->msg.type) { in vhost_chr_read_iter()
1622 size = sizeof(node->msg); in vhost_chr_read_iter()
1623 msg = &node->msg.iotlb; in vhost_chr_read_iter()
1626 size = sizeof(node->msg_v2); in vhost_chr_read_iter()
1627 msg = &node->msg_v2.iotlb; in vhost_chr_read_iter()
1636 kfree(node); in vhost_chr_read_iter()
1639 vhost_enqueue_msg(dev, &dev->pending_list, node); in vhost_chr_read_iter()
1649 struct vhost_msg_node *node; in vhost_iotlb_miss() local
1653 node = vhost_new_msg(vq, v2 ? VHOST_IOTLB_MSG_V2 : VHOST_IOTLB_MSG); in vhost_iotlb_miss()
1654 if (!node) in vhost_iotlb_miss()
1658 node->msg_v2.type = VHOST_IOTLB_MSG_V2; in vhost_iotlb_miss()
1659 msg = &node->msg_v2.iotlb; in vhost_iotlb_miss()
1661 msg = &node->msg.iotlb; in vhost_iotlb_miss()
1668 vhost_enqueue_msg(dev, &dev->read_list, node); in vhost_iotlb_miss()
2923 struct vhost_msg_node *node = kzalloc(sizeof(*node), GFP_KERNEL); in vhost_new_msg() local
2924 if (!node) in vhost_new_msg()
2927 node->vq = vq; in vhost_new_msg()
2928 node->msg.type = type; in vhost_new_msg()
2929 return node; in vhost_new_msg()
2934 struct vhost_msg_node *node) in vhost_enqueue_msg() argument
2937 list_add_tail(&node->node, head); in vhost_enqueue_msg()
2947 struct vhost_msg_node *node = NULL; in vhost_dequeue_msg() local
2951 node = list_first_entry(head, struct vhost_msg_node, in vhost_dequeue_msg()
2952 node); in vhost_dequeue_msg()
2953 list_del(&node->node); in vhost_dequeue_msg()
2957 return node; in vhost_dequeue_msg()