Skip to content

Commit

Permalink
dm raid1: explicitly initialise bio_lists
Browse files Browse the repository at this point in the history
Explicitly initialize bio lists instead of relying on kzalloc.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Reviewed-by: Takahiro Yasui <tyasui@redhat.com>
Tested-by: Takahiro Yasui <tyasui@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
  • Loading branch information
Mikulas Patocka authored and Alasdair G Kergon committed Dec 10, 2009
1 parent 929be8f commit 5339fc2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/md/dm-raid1.c
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,10 @@ static struct mirror_set *alloc_context(unsigned int nr_mirrors,
}

spin_lock_init(&ms->lock);
bio_list_init(&ms->reads);
bio_list_init(&ms->writes);
bio_list_init(&ms->failures);
bio_list_init(&ms->holds);

ms->ti = ti;
ms->nr_mirrors = nr_mirrors;
Expand Down

0 comments on commit 5339fc2

Please sign in to comment.