Skip to content

Commit

Permalink
dm: bio list add bio_list_add_head
Browse files Browse the repository at this point in the history
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 <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
  • Loading branch information
Mikulas Patocka authored and Alasdair G Kergon committed Apr 2, 2009
1 parent a32079c commit 99c75e3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/md/dm-bio-list.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 99c75e3

Please sign in to comment.