From: NeilBrown <neilb@suse.de>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 001 of 6] md: INIT_LIST_HEAD to LIST_HEAD conversions.
Date: Fri, 17 Mar 2006 18:21:26 +1100 [thread overview]
Message-ID: <1060317072126.28614@suse.de> (raw)
In-Reply-To: 20060317181912.28543.patches@notabene
A couple of places we all INIT_LIST_HEAD on a locally declared
variable. This can be changed to a LIST_HEAD declaration.
Signed-off-by: Neil Brown <neilb@suse.de>
### Diffstat output
./drivers/md/md.c | 2 +-
./drivers/md/raid5.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff ./drivers/md/md.c~current~ ./drivers/md/md.c
--- ./drivers/md/md.c~current~ 2006-03-17 18:17:56.000000000 +1100
+++ ./drivers/md/md.c 2006-03-17 18:18:19.000000000 +1100
@@ -2895,7 +2895,6 @@ static void autorun_array(mddev_t *mddev
*/
static void autorun_devices(int part)
{
- struct list_head candidates;
struct list_head *tmp;
mdk_rdev_t *rdev0, *rdev;
mddev_t *mddev;
@@ -2904,6 +2903,7 @@ static void autorun_devices(int part)
printk(KERN_INFO "md: autorun ...\n");
while (!list_empty(&pending_raid_disks)) {
dev_t dev;
+ LIST_HEAD(candidates);
rdev0 = list_entry(pending_raid_disks.next,
mdk_rdev_t, same_set);
diff ./drivers/md/raid5.c~current~ ./drivers/md/raid5.c
--- ./drivers/md/raid5.c~current~ 2006-03-17 18:17:57.000000000 +1100
+++ ./drivers/md/raid5.c 2006-03-17 18:18:19.000000000 +1100
@@ -345,7 +345,8 @@ static int resize_stripes(raid5_conf_t *
* at some points in this operation.
*/
struct stripe_head *osh, *nsh;
- struct list_head newstripes, oldstripes;
+ LIST_HEAD(newstripes);
+ LIST_HEAD(oldstripes);
struct disk_info *ndisks;
int err = 0;
kmem_cache_t *sc;
@@ -359,7 +360,7 @@ static int resize_stripes(raid5_conf_t *
0, 0, NULL, NULL);
if (!sc)
return -ENOMEM;
- INIT_LIST_HEAD(&newstripes);
+
for (i = conf->max_nr_stripes; i; i--) {
nsh = kmem_cache_alloc(sc, GFP_NOIO);
if (!nsh)
@@ -385,7 +386,6 @@ static int resize_stripes(raid5_conf_t *
/* OK, we have enough stripes, start collecting inactive
* stripes and copying them over
*/
- INIT_LIST_HEAD(&oldstripes);
list_for_each_entry(nsh, &newstripes, lru) {
spin_lock_irq(&conf->device_lock);
wait_event_lock_irq(conf->wait_for_stripe,
next prev parent reply other threads:[~2006-03-17 7:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-17 7:21 [PATCH 000 of 6] md: Introduction - patching those patches NeilBrown
2006-03-17 7:21 ` NeilBrown [this message]
2006-03-17 7:21 ` [PATCH 002 of 6] md: Documentation and tidy up for resize_stripes NeilBrown
2006-03-17 7:21 ` [PATCH 003 of 6] md: Remove an unused variable NeilBrown
2006-03-17 7:21 ` [PATCH 004 of 6] md: Improve comments about locking situation in raid5 make_request NeilBrown
2006-03-17 7:21 ` [PATCH 005 of 6] md: Remove some stray semi-colons after functions called in macro NeilBrown
2006-03-17 7:21 ` [PATCH 006 of 6] md: Make new function stripe_to_pdidx static NeilBrown
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=1060317072126.28614@suse.de \
--to=neilb@suse.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).