lkml.org 
[lkml]   [2004]   [Jun]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] DM 5/5: dm-raid1.c: Use list_for_each_entry_safe
Date
dm-raid1.c: In rh_exit(), use list_for_each_entry_safe instead of
list_for_each_safe.

Signed-off-by: Kevin Corry <kevcorry@us.ibm.com>

--- 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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:03    [W:0.044 / U:0.508 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site