Commit 233886dd authored by jblunck@suse.de's avatar jblunck@suse.de Committed by Linus Torvalds

[PATCH] device-mapper snapshot: bio_list fix

bio_list_merge() should do nothing if the second list is empty - not oops.
Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 640eb3b0
...@@ -33,6 +33,9 @@ static inline void bio_list_add(struct bio_list *bl, struct bio *bio) ...@@ -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) static inline void bio_list_merge(struct bio_list *bl, struct bio_list *bl2)
{ {
if (!bl2->head)
return;
if (bl->tail) if (bl->tail)
bl->tail->bi_next = bl2->head; bl->tail->bi_next = bl2->head;
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment