[PATCH] DM 5/5: dm-raid1.c: Use list_for_each_entry_safe

From: Kevin Corry
Date: Mon Jun 14 2004 - 13:21:06 EST


dm-raid1.c: In rh_exit(), use list_for_each_entry_safe instead of
list_for_each_safe.

Signed-off-by: Kevin Corry <kevcorry@xxxxxxxxxx>

--- diff/drivers/md/dm-raid1.c 2004-06-14 09:30:12.916701520 +0000
+++ source/drivers/md/dm-raid1.c 2004-06-14 09:30:17.978931944 +0000
@@ -187,13 +187,11 @@
static void rh_exit(struct region_hash *rh)
{
unsigned int h;
- struct region *reg;
- struct list_head *tmp, *tmp2;
+ struct region *reg, *nreg;

BUG_ON(!list_empty(&rh->quiesced_regions));
for (h = 0; h < rh->nr_buckets; h++) {
- list_for_each_safe (tmp, tmp2, rh->buckets + h) {
- reg = list_entry(tmp, struct region, hash_list);
+ list_for_each_entry_safe(reg, nreg, rh->buckets + h, hash_list) {
BUG_ON(atomic_read(&reg->pending));
mempool_free(reg, rh->region_pool);
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/