aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-bio-list.h
diff options
context:
space:
mode:
authorjblunck@suse.de <jblunck@suse.de>2005-11-22 00:32:36 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-22 12:14:31 -0500
commit233886dd32ad71daf9c21bf3728c0933a94870f0 (patch)
tree4c60f5639c0983a76a43f51917868bce48acc4f9 /drivers/md/dm-bio-list.h
parent640eb3b0456f8273726d31160aa24568ae703eec (diff)
[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 <agk@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
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 bc021e1fd4d1..bbf4615f0e30 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)
33 33
34static inline void bio_list_merge(struct bio_list *bl, struct bio_list *bl2) 34static inline void bio_list_merge(struct bio_list *bl, struct bio_list *bl2)
35{ 35{
36 if (!bl2->head)
37 return;
38
36 if (bl->tail) 39 if (bl->tail)
37 bl->tail->bi_next = bl2->head; 40 bl->tail->bi_next = bl2->head;
38 else 41 else