]> git.baikalelectronics.ru Git - kernel.git/commit
MD RAID10: Fix oops when creating RAID10 arrays via dm-raid.c
authorJonathan Brassow <jbrassow@redhat.com>
Wed, 31 Oct 2012 00:42:30 +0000 (11:42 +1100)
committerNeilBrown <neilb@suse.de>
Wed, 31 Oct 2012 00:42:30 +0000 (11:42 +1100)
commita751bc95c97188d4f6d8c392b8d1c89eca890d8b
treebd57d2636bbe5d757549fc6dde8d2b93643bb4f2
parent776750489d0b611f3473b271109f9843207504a6
MD RAID10: Fix oops when creating RAID10 arrays via dm-raid.c

Commit 91248179 didn't take into account the changes to add TRIM support to
RAID10 (commit 7b757e9e5).  That is, when using dm-raid.c to create the
RAID10 arrays, there is no mddev->gendisk or mddev->queue.  The code added
to support TRIM simply assumes that mddev->queue is available without
checking.  The result is an oops any time dm-raid.c attempts to create a
RAID10 device.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/raid10.c