]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] device-mapper snapshot: bio_list fix
authorjblunck@suse.de <jblunck@suse.de>
Tue, 22 Nov 2005 05:32:36 +0000 (21:32 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 22 Nov 2005 17:14:31 +0000 (09:14 -0800)
bio_list_merge() should do nothing if the second list is empty - not oops.

Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/md/dm-bio-list.h

index bc021e1fd4d14b6d04a465cc6e91c7491032bfb7..bbf4615f0e30d792990208325fa9fa48580ce879 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