diff options
author | NeilBrown <neilb@suse.de> | 2008-02-06 04:39:59 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-06 13:41:19 -0500 |
commit | 73c34431c7119d0bc7d3436abfad75fe47b2c51f (patch) | |
tree | c91210130d1115354f011e55c98db9361d4416f8 /include/linux/raid/md_k.h | |
parent | d089c6af10c2be5988f03667d6d22fe6085fbe5e (diff) |
md: change ITERATE_RDEV_GENERIC to rdev_for_each_list, and remove ITERATE_RDEV_PENDING.
Finish ITERATE_ to for_each conversion.
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 'include/linux/raid/md_k.h')
-rw-r--r-- | include/linux/raid/md_k.h | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/include/linux/raid/md_k.h b/include/linux/raid/md_k.h index 9c19555f314b..85a068bab625 100644 --- a/include/linux/raid/md_k.h +++ b/include/linux/raid/md_k.h | |||
@@ -313,23 +313,17 @@ static inline char * mdname (mddev_t * mddev) | |||
313 | * iterates through some rdev ringlist. It's safe to remove the | 313 | * iterates through some rdev ringlist. It's safe to remove the |
314 | * current 'rdev'. Dont touch 'tmp' though. | 314 | * current 'rdev'. Dont touch 'tmp' though. |
315 | */ | 315 | */ |
316 | #define ITERATE_RDEV_GENERIC(head,rdev,tmp) \ | 316 | #define rdev_for_each_list(rdev, tmp, list) \ |
317 | \ | 317 | \ |
318 | for ((tmp) = (head).next; \ | 318 | for ((tmp) = (list).next; \ |
319 | (rdev) = (list_entry((tmp), mdk_rdev_t, same_set)), \ | 319 | (rdev) = (list_entry((tmp), mdk_rdev_t, same_set)), \ |
320 | (tmp) = (tmp)->next, (tmp)->prev != &(head) \ | 320 | (tmp) = (tmp)->next, (tmp)->prev != &(list) \ |
321 | ; ) | 321 | ; ) |
322 | /* | 322 | /* |
323 | * iterates through the 'same array disks' ringlist | 323 | * iterates through the 'same array disks' ringlist |
324 | */ | 324 | */ |
325 | #define rdev_for_each(rdev, tmp, mddev) \ | 325 | #define rdev_for_each(rdev, tmp, mddev) \ |
326 | ITERATE_RDEV_GENERIC((mddev)->disks,rdev,tmp) | 326 | rdev_for_each_list(rdev, tmp, (mddev)->disks) |
327 | |||
328 | /* | ||
329 | * Iterates through 'pending RAID disks' | ||
330 | */ | ||
331 | #define ITERATE_RDEV_PENDING(rdev,tmp) \ | ||
332 | ITERATE_RDEV_GENERIC(pending_raid_disks,rdev,tmp) | ||
333 | 327 | ||
334 | typedef struct mdk_thread_s { | 328 | typedef struct mdk_thread_s { |
335 | void (*run) (mddev_t *mddev); | 329 | void (*run) (mddev_t *mddev); |