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 struct bio
*bio_list_pop(struct bio_list
*bl
)
49 struct bio
*bio
= bl
->head
;
52 bl
->head
= bl
->head
->bi_next
;
62 static inline struct bio
*bio_list_get(struct bio_list
*bl
)
64 struct bio
*bio
= bl
->head
;
66 bl
->head
= bl
->tail
= NULL
;