From: Kevin Corry <kevcorry@us.ibm.com>

dm-raid1.c: Declare fixed-sized (instead of variable-sized) arrays on the
stack in recover() and do_write().

Signed-off-by: Kevin Corry <kevcorry@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/drivers/md/dm-raid1.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -puN drivers/md/dm-raid1.c~4-4-dm-dm-raid1c-use-fixed-size-arrays drivers/md/dm-raid1.c
--- 25/drivers/md/dm-raid1.c~4-4-dm-dm-raid1c-use-fixed-size-arrays	2004-06-30 13:05:11.022569840 -0700
+++ 25-akpm/drivers/md/dm-raid1.c	2004-06-30 13:05:11.026569232 -0700
@@ -602,7 +602,7 @@ static int recover(struct mirror_set *ms
 {
 	int r;
 	unsigned int i;
-	struct io_region from, to[ms->nr_mirrors - 1], *dest;
+	struct io_region from, to[KCOPYD_MAX_REGIONS], *dest;
 	struct mirror *m;
 	unsigned long flags = 0;
 
@@ -757,7 +757,7 @@ static void write_callback(unsigned long
 static void do_write(struct mirror_set *ms, struct bio *bio)
 {
 	unsigned int i;
-	struct io_region io[ms->nr_mirrors];
+	struct io_region io[KCOPYD_MAX_REGIONS+1];
 	struct mirror *m;
 
 	for (i = 0; i < ms->nr_mirrors; i++) {
_