From: Kevin Corry <kevcorry@us.ibm.com>
To: Linus Torvalds <torvalds@osdl.org>, Andrew Morton <akpm@osdl.org>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] 4/4: DM: dm-raid1.c: Use fixed-size arrays
Date: Wed, 30 Jun 2004 14:58:46 -0500 [thread overview]
Message-ID: <200406301458.46109.kevcorry@us.ibm.com> (raw)
In-Reply-To: <200406301452.16886.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>
--- diff/drivers/md/dm-raid1.c 2004-06-30 08:48:25.247347928 -0500
+++ source/drivers/md/dm-raid1.c 2004-06-30 08:48:30.101609968 -0500
@@ -602,7 +602,7 @@
{
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 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++) {
next prev parent reply other threads:[~2004-06-30 19:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-30 19:52 [PATCH] 0/4: Device-Mapper: Minor cleanups and fixes Kevin Corry
2004-06-30 19:57 ` [PATCH] 1/4: DM: kcopyd.c: Remove unused include Kevin Corry
2004-06-30 19:57 ` [PATCH] 2/4: DM: kcopyd.c: make client_add() return void Kevin Corry
2004-06-30 19:58 ` [PATCH] 3/4: DM: dm-raid1.c: Enforce max of 9 mirrors Kevin Corry
2004-06-30 19:58 ` Kevin Corry [this message]
2004-06-30 20:07 ` [PATCH] 4/4: DM: dm-raid1.c: Use fixed-size arrays Michael Buesch
2004-06-30 20:28 ` Jedi/Sector One
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200406301458.46109.kevcorry@us.ibm.com \
--to=kevcorry@us.ibm.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.