/* Remove and return the first bio from a single linked list defined by its head and tail pointers.  */
static struct bio* pkt_get_list_first(struct bio **list_head, struct bio **list_tail)
/* Remove and return the first bio from a single linked list defined by its head and tail pointers.  */
static struct bio* pkt_get_list_first(struct bio **list_head, struct bio **list_tail)
{
	struct bio *bio;
	if (*list_head == NULL)
		return NULL;
	bio = *list_head;
	*list_head = bio->bi_next;
	if (*list_head == NULL)
		*list_tail = NULL;
	bio->bi_next = NULL;
	return bio;
}