diff options
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); |