Skip to content

Commit

Permalink
md: change INTERATE_MDDEV to for_each_mddev
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
NeilBrown authored and Linus Torvalds committed Feb 6, 2008
1 parent 20a49ff commit 29ac4aa
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions drivers/md/md.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ static DEFINE_SPINLOCK(all_mddevs_lock);
* Any code which breaks out of this loop while own
* a reference to the current mddev and must mddev_put it.
*/
#define ITERATE_MDDEV(mddev,tmp) \
#define for_each_mddev(mddev,tmp) \
\
for (({ spin_lock(&all_mddevs_lock); \
tmp = all_mddevs.next; \
Expand Down Expand Up @@ -1594,7 +1594,7 @@ static void md_print_devices(void)
printk("md: **********************************\n");
printk("md: * <COMPLETE RAID STATE PRINTOUT> *\n");
printk("md: **********************************\n");
ITERATE_MDDEV(mddev,tmp) {
for_each_mddev(mddev, tmp) {

if (mddev->bitmap)
bitmap_print_sb(mddev->bitmap);
Expand Down Expand Up @@ -2012,7 +2012,7 @@ rdev_size_store(mdk_rdev_t *rdev, const char *buf, size_t len)
struct list_head *tmp, *tmp2;

mddev_unlock(rdev->mddev);
ITERATE_MDDEV(mddev, tmp) {
for_each_mddev(mddev, tmp) {
mdk_rdev_t *rdev2;

mddev_lock(mddev);
Expand Down Expand Up @@ -5465,7 +5465,7 @@ void md_do_sync(mddev_t *mddev)
set_bit(MD_RECOVERY_INTR, &mddev->recovery);
goto skip;
}
ITERATE_MDDEV(mddev2,tmp) {
for_each_mddev(mddev2, tmp) {
if (mddev2 == mddev)
continue;
if (mddev2->curr_resync &&
Expand Down Expand Up @@ -5913,7 +5913,7 @@ static int md_notify_reboot(struct notifier_block *this,

printk(KERN_INFO "md: stopping all md devices.\n");

ITERATE_MDDEV(mddev,tmp)
for_each_mddev(mddev, tmp)
if (mddev_trylock(mddev)) {
do_md_stop (mddev, 1);
mddev_unlock(mddev);
Expand Down Expand Up @@ -6047,7 +6047,7 @@ static __exit void md_exit(void)
unregister_reboot_notifier(&md_notifier);
unregister_sysctl_table(raid_table_header);
remove_proc_entry("mdstat", NULL);
ITERATE_MDDEV(mddev,tmp) {
for_each_mddev(mddev, tmp) {
struct gendisk *disk = mddev->gendisk;
if (!disk)
continue;
Expand Down

0 comments on commit 29ac4aa

Please sign in to comment.