2 * Copyright (C) 2004 Red Hat UK Ltd.
4 * This file is released under the GPL.
10 #include <linux/bio.h>
17 static inline void bio_list_init(struct bio_list *bl)
19 bl->head = bl->tail = NULL;
22 static inline void bio_list_add(struct bio_list *bl, struct bio *bio)
27 bl->tail->bi_next = bio;
34 static inline void bio_list_merge(struct bio_list *bl, struct bio_list *bl2)
37 bl->tail->bi_next = bl2->head;
44 static inline struct bio *bio_list_pop(struct bio_list *bl)
46 struct bio *bio = bl->head;
49 bl->head = bl->head->bi_next;
59 static inline struct bio *bio_list_get(struct bio_list *bl)
61 struct bio *bio = bl->head;
63 bl->head = bl->tail = NULL;