dm raid: stop using BUG() in __rdev_sectors()
authorHeinz Mauelshagen <heinzm@redhat.com>
Fri, 30 Jun 2017 13:45:58 +0000 (15:45 +0200)
committerMike Snitzer <snitzer@redhat.com>
Fri, 30 Jun 2017 14:15:52 +0000 (10:15 -0400)
commit4d49f1b4a1fcab16b6dd1c79ef14f2b6531d50a6
treef754d4b98f1f9db0814290f64a5c0e41a2cd1638
parent3b1a94c88b798d4f3bd1a5b61f5c8fb9d987c242
dm raid: stop using BUG() in __rdev_sectors()

Return 0 rather than BUG() if __rdev_sectors() fails and catch invalid
rdev size in the constructor.

Reported-by: Hannes Reinecke <hare@suse.de>
Cc: stable@vger.kernel.org
Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-raid.c