diff options
author | NeilBrown <neilb@suse.de> | 2008-02-06 04:39:58 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-06 13:41:19 -0500 |
commit | 29ac4aa3fc68a86279aca50f20df4d614de2e204 (patch) | |
tree | 4265c6d305f2df52029c99a2a6af901f58444c10 /drivers/md/md.c | |
parent | 20a49ff679fb1caa69c69eb0361bea488e51c9b2 (diff) |
md: change INTERATE_MDDEV to for_each_mddev
As this is more consistent with kernel style.
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index f08b6e786c0a..c912ce2752a4 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -195,7 +195,7 @@ static DEFINE_SPINLOCK(all_mddevs_lock); | |||
195 | * Any code which breaks out of this loop while own | 195 | * Any code which breaks out of this loop while own |
196 | * a reference to the current mddev and must mddev_put it. | 196 | * a reference to the current mddev and must mddev_put it. |
197 | */ | 197 | */ |
198 | #define ITERATE_MDDEV(mddev,tmp) \ | 198 | #define for_each_mddev(mddev,tmp) \ |
199 | \ | 199 | \ |
200 | for (({ spin_lock(&all_mddevs_lock); \ | 200 | for (({ spin_lock(&all_mddevs_lock); \ |
201 | tmp = all_mddevs.next; \ | 201 | tmp = all_mddevs.next; \ |
@@ -1594,7 +1594,7 @@ static void md_print_devices(void) | |||
1594 | printk("md: **********************************\n"); | 1594 | printk("md: **********************************\n"); |
1595 | printk("md: * <COMPLETE RAID STATE PRINTOUT> *\n"); | 1595 | printk("md: * <COMPLETE RAID STATE PRINTOUT> *\n"); |
1596 | printk("md: **********************************\n"); | 1596 | printk("md: **********************************\n"); |
1597 | ITERATE_MDDEV(mddev,tmp) { | 1597 | for_each_mddev(mddev, tmp) { |
1598 | 1598 | ||
1599 | if (mddev->bitmap) | 1599 | if (mddev->bitmap) |
1600 | bitmap_print_sb(mddev->bitmap); | 1600 | bitmap_print_sb(mddev->bitmap); |
@@ -2012,7 +2012,7 @@ rdev_size_store(mdk_rdev_t *rdev, const char *buf, size_t len) | |||
2012 | struct list_head *tmp, *tmp2; | 2012 | struct list_head *tmp, *tmp2; |
2013 | 2013 | ||
2014 | mddev_unlock(rdev->mddev); | 2014 | mddev_unlock(rdev->mddev); |
2015 | ITERATE_MDDEV(mddev, tmp) { | 2015 | for_each_mddev(mddev, tmp) { |
2016 | mdk_rdev_t *rdev2; | 2016 | mdk_rdev_t *rdev2; |
2017 | 2017 | ||
2018 | mddev_lock(mddev); | 2018 | mddev_lock(mddev); |
@@ -5465,7 +5465,7 @@ void md_do_sync(mddev_t *mddev) | |||
5465 | set_bit(MD_RECOVERY_INTR, &mddev->recovery); | 5465 | set_bit(MD_RECOVERY_INTR, &mddev->recovery); |
5466 | goto skip; | 5466 | goto skip; |
5467 | } | 5467 | } |
5468 | ITERATE_MDDEV(mddev2,tmp) { | 5468 | for_each_mddev(mddev2, tmp) { |
5469 | if (mddev2 == mddev) | 5469 | if (mddev2 == mddev) |
5470 | continue; | 5470 | continue; |
5471 | if (mddev2->curr_resync && | 5471 | if (mddev2->curr_resync && |
@@ -5913,7 +5913,7 @@ static int md_notify_reboot(struct notifier_block *this, | |||
5913 | 5913 | ||
5914 | printk(KERN_INFO "md: stopping all md devices.\n"); | 5914 | printk(KERN_INFO "md: stopping all md devices.\n"); |
5915 | 5915 | ||
5916 | ITERATE_MDDEV(mddev,tmp) | 5916 | for_each_mddev(mddev, tmp) |
5917 | if (mddev_trylock(mddev)) { | 5917 | if (mddev_trylock(mddev)) { |
5918 | do_md_stop (mddev, 1); | 5918 | do_md_stop (mddev, 1); |
5919 | mddev_unlock(mddev); | 5919 | mddev_unlock(mddev); |
@@ -6047,7 +6047,7 @@ static __exit void md_exit(void) | |||
6047 | unregister_reboot_notifier(&md_notifier); | 6047 | unregister_reboot_notifier(&md_notifier); |
6048 | unregister_sysctl_table(raid_table_header); | 6048 | unregister_sysctl_table(raid_table_header); |
6049 | remove_proc_entry("mdstat", NULL); | 6049 | remove_proc_entry("mdstat", NULL); |
6050 | ITERATE_MDDEV(mddev,tmp) { | 6050 | for_each_mddev(mddev, tmp) { |
6051 | struct gendisk *disk = mddev->gendisk; | 6051 | struct gendisk *disk = mddev->gendisk; |
6052 | if (!disk) | 6052 | if (!disk) |
6053 | continue; | 6053 | continue; |