From: jblunck@suse.de Date: Tue, 22 Nov 2005 05:32:36 +0000 (-0800) Subject: [PATCH] device-mapper snapshot: bio_list fix X-Git-Tag: v2.6.15-rc4~69 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=233886dd32ad71daf9c21bf3728c0933a94870f0;p=linux-2.6-omap-h63xx.git [PATCH] device-mapper snapshot: bio_list fix bio_list_merge() should do nothing if the second list is empty - not oops. Signed-off-by: Alasdair G Kergon Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/md/dm-bio-list.h b/drivers/md/dm-bio-list.h index bc021e1fd4d..bbf4615f0e3 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