diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2009-04-02 18:55:36 (GMT) |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2009-04-02 18:55:36 (GMT) |
commit | 99c75e3130cff0c869c657ee97fb4a68958eeffc (patch) | |
tree | cd3aaee7a0aeab15a3cc345046ef2020e62f21cd /drivers/md/dm-bio-list.h | |
parent | a32079ce17899192a7b98a42753be467605a8b2f (diff) | |
download | linux-99c75e3130cff0c869c657ee97fb4a68958eeffc.tar.xz |
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 <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm-bio-list.h')
-rw-r--r-- | drivers/md/dm-bio-list.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/md/dm-bio-list.h b/drivers/md/dm-bio-list.h index d4509be..345098b 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) |