Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / drivers / md / dm-bio-list.h
index bc021e1..bbf4615 100644 (file)
@@ -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