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)
40 bl->tail->bi_next = bl2->head;
47 static inline void bio_list_merge_head(struct bio_list *bl,
54 bl2->tail->bi_next = bl->head;
61 static inline struct bio *bio_list_pop(struct bio_list *bl)
63 struct bio *bio = bl->head;
66 bl->head = bl->head->bi_next;
76 static inline struct bio *bio_list_get(struct bio_list *bl)
78 struct bio *bio = bl->head;
80 bl->head = bl->tail = NULL;