summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-bio-list.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/dm-bio-list.h')
-rw-r--r--drivers/md/dm-bio-list.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/md/dm-bio-list.h b/drivers/md/dm-bio-list.h
index bc021e1..bbf4615 100644
--- a/drivers/md/dm-bio-list.h
+++ b/drivers/md/dm-bio-list.h
@@ -33,6 +33,9 @@ static inline void bio_list_add(struct bio_list *bl, struct bio *bio)
static inline void bio_list_merge(struct bio_list *bl, struct bio_list *bl2)
{
+ if (!bl2->head)
+ return;
+
if (bl->tail)
bl->tail->bi_next = bl2->head;
else
OpenPOWER on IntegriCloud