diff options
Diffstat (limited to 'drivers/md/dm-bio-list.h')
-rw-r--r-- | drivers/md/dm-bio-list.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/md/dm-bio-list.h b/drivers/md/dm-bio-list.h index bbf4615f0e30..da4349649f7f 100644 --- a/drivers/md/dm-bio-list.h +++ b/drivers/md/dm-bio-list.h | |||
@@ -44,6 +44,20 @@ static inline void bio_list_merge(struct bio_list *bl, struct bio_list *bl2) | |||
44 | bl->tail = bl2->tail; | 44 | bl->tail = bl2->tail; |
45 | } | 45 | } |
46 | 46 | ||
47 | static inline void bio_list_merge_head(struct bio_list *bl, | ||
48 | struct bio_list *bl2) | ||
49 | { | ||
50 | if (!bl2->head) | ||
51 | return; | ||
52 | |||
53 | if (bl->head) | ||
54 | bl2->tail->bi_next = bl->head; | ||
55 | else | ||
56 | bl->tail = bl2->tail; | ||
57 | |||
58 | bl->head = bl2->head; | ||
59 | } | ||
60 | |||
47 | static inline struct bio *bio_list_pop(struct bio_list *bl) | 61 | static inline struct bio *bio_list_pop(struct bio_list *bl) |
48 | { | 62 | { |
49 | struct bio *bio = bl->head; | 63 | struct bio *bio = bl->head; |