Lines Matching refs:bl

488 static inline int bio_list_empty(const struct bio_list *bl)  in bio_list_empty()  argument
490 return bl->head == NULL; in bio_list_empty()
493 static inline void bio_list_init(struct bio_list *bl) in bio_list_init() argument
495 bl->head = bl->tail = NULL; in bio_list_init()
500 #define bio_list_for_each(bio, bl) \ argument
501 for (bio = (bl)->head; bio; bio = bio->bi_next)
503 static inline unsigned bio_list_size(const struct bio_list *bl) in bio_list_size() argument
508 bio_list_for_each(bio, bl) in bio_list_size()
514 static inline void bio_list_add(struct bio_list *bl, struct bio *bio) in bio_list_add() argument
518 if (bl->tail) in bio_list_add()
519 bl->tail->bi_next = bio; in bio_list_add()
521 bl->head = bio; in bio_list_add()
523 bl->tail = bio; in bio_list_add()
526 static inline void bio_list_add_head(struct bio_list *bl, struct bio *bio) in bio_list_add_head() argument
528 bio->bi_next = bl->head; in bio_list_add_head()
530 bl->head = bio; in bio_list_add_head()
532 if (!bl->tail) in bio_list_add_head()
533 bl->tail = bio; in bio_list_add_head()
536 static inline void bio_list_merge(struct bio_list *bl, struct bio_list *bl2) in bio_list_merge() argument
541 if (bl->tail) in bio_list_merge()
542 bl->tail->bi_next = bl2->head; in bio_list_merge()
544 bl->head = bl2->head; in bio_list_merge()
546 bl->tail = bl2->tail; in bio_list_merge()
549 static inline void bio_list_merge_init(struct bio_list *bl, in bio_list_merge_init() argument
552 bio_list_merge(bl, bl2); in bio_list_merge_init()
556 static inline void bio_list_merge_head(struct bio_list *bl, in bio_list_merge_head() argument
562 if (bl->head) in bio_list_merge_head()
563 bl2->tail->bi_next = bl->head; in bio_list_merge_head()
565 bl->tail = bl2->tail; in bio_list_merge_head()
567 bl->head = bl2->head; in bio_list_merge_head()
570 static inline struct bio *bio_list_peek(struct bio_list *bl) in bio_list_peek() argument
572 return bl->head; in bio_list_peek()
575 static inline struct bio *bio_list_pop(struct bio_list *bl) in bio_list_pop() argument
577 struct bio *bio = bl->head; in bio_list_pop()
580 bl->head = bl->head->bi_next; in bio_list_pop()
581 if (!bl->head) in bio_list_pop()
582 bl->tail = NULL; in bio_list_pop()
590 static inline struct bio *bio_list_get(struct bio_list *bl) in bio_list_get() argument
592 struct bio *bio = bl->head; in bio_list_get()
594 bl->head = bl->tail = NULL; in bio_list_get()