Skip to content

Commit

Permalink
[PATCH] device-mapper snapshot: bio_list fix
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
jblunck@suse.de authored and Linus Torvalds committed Nov 22, 2005
1 parent 640eb3b commit 233886d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/md/dm-bio-list.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 233886d

Please sign in to comment.