From: Mikulas Patocka Date: Thu, 2 Apr 2009 18:55:36 +0000 (+0100) Subject: dm: bio list add bio_list_add_head X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=99c75e3130cff0c869c657ee97fb4a68958eeffc;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git dm: bio list add bio_list_add_head Introduce a function that adds a bio to the head of the list for use by the patch that will support barriers. Signed-off-by: Mikulas Patocka Signed-off-by: Alasdair G Kergon --- diff --git a/drivers/md/dm-bio-list.h b/drivers/md/dm-bio-list.h index d4509be0fe67..345098b4ca77 100644 --- a/drivers/md/dm-bio-list.h +++ b/drivers/md/dm-bio-list.h @@ -52,6 +52,16 @@ static inline void bio_list_add(struct bio_list *bl, struct bio *bio) bl->tail = bio; } +static inline void bio_list_add_head(struct bio_list *bl, struct bio *bio) +{ + bio->bi_next = bl->head; + + bl->head = bio; + + if (!bl->tail) + bl->tail = bio; +} + static inline void bio_list_merge(struct bio_list *bl, struct bio_list *bl2) { if (!bl2->head)