diff options
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/dm-bio-prison.c | 3 | ||||
-rw-r--r-- | drivers/md/dm-bufio.c | 3 | ||||
-rw-r--r-- | drivers/md/dm-snap.c | 3 | ||||
-rw-r--r-- | drivers/md/persistent-data/dm-transaction-manager.c | 7 | ||||
-rw-r--r-- | drivers/md/raid5.c | 3 |
5 files changed, 7 insertions, 12 deletions
diff --git a/drivers/md/dm-bio-prison.c b/drivers/md/dm-bio-prison.c index aefb78e3cbf9..d9d3f1c7b662 100644 --- a/drivers/md/dm-bio-prison.c +++ b/drivers/md/dm-bio-prison.c | |||
@@ -106,9 +106,8 @@ static struct dm_bio_prison_cell *__search_bucket(struct hlist_head *bucket, | |||
106 | struct dm_cell_key *key) | 106 | struct dm_cell_key *key) |
107 | { | 107 | { |
108 | struct dm_bio_prison_cell *cell; | 108 | struct dm_bio_prison_cell *cell; |
109 | struct hlist_node *tmp; | ||
110 | 109 | ||
111 | hlist_for_each_entry(cell, tmp, bucket, list) | 110 | hlist_for_each_entry(cell, bucket, list) |
112 | if (keys_equal(&cell->key, key)) | 111 | if (keys_equal(&cell->key, key)) |
113 | return cell; | 112 | return cell; |
114 | 113 | ||
diff --git a/drivers/md/dm-bufio.c b/drivers/md/dm-bufio.c index 651ca79881dd..93205e32a004 100644 --- a/drivers/md/dm-bufio.c +++ b/drivers/md/dm-bufio.c | |||
@@ -859,9 +859,8 @@ static void __check_watermark(struct dm_bufio_client *c) | |||
859 | static struct dm_buffer *__find(struct dm_bufio_client *c, sector_t block) | 859 | static struct dm_buffer *__find(struct dm_bufio_client *c, sector_t block) |
860 | { | 860 | { |
861 | struct dm_buffer *b; | 861 | struct dm_buffer *b; |
862 | struct hlist_node *hn; | ||
863 | 862 | ||
864 | hlist_for_each_entry(b, hn, &c->cache_hash[DM_BUFIO_HASH(block)], | 863 | hlist_for_each_entry(b, &c->cache_hash[DM_BUFIO_HASH(block)], |
865 | hash_list) { | 864 | hash_list) { |
866 | dm_bufio_cond_resched(); | 865 | dm_bufio_cond_resched(); |
867 | if (b->block == block) | 866 | if (b->block == block) |
diff --git a/drivers/md/dm-snap.c b/drivers/md/dm-snap.c index 59fc18ae52c2..10079e07edf4 100644 --- a/drivers/md/dm-snap.c +++ b/drivers/md/dm-snap.c | |||
@@ -227,12 +227,11 @@ static void stop_tracking_chunk(struct dm_snapshot *s, struct bio *bio) | |||
227 | static int __chunk_is_tracked(struct dm_snapshot *s, chunk_t chunk) | 227 | static int __chunk_is_tracked(struct dm_snapshot *s, chunk_t chunk) |
228 | { | 228 | { |
229 | struct dm_snap_tracked_chunk *c; | 229 | struct dm_snap_tracked_chunk *c; |
230 | struct hlist_node *hn; | ||
231 | int found = 0; | 230 | int found = 0; |
232 | 231 | ||
233 | spin_lock_irq(&s->tracked_chunk_lock); | 232 | spin_lock_irq(&s->tracked_chunk_lock); |
234 | 233 | ||
235 | hlist_for_each_entry(c, hn, | 234 | hlist_for_each_entry(c, |
236 | &s->tracked_chunk_hash[DM_TRACKED_CHUNK_HASH(chunk)], node) { | 235 | &s->tracked_chunk_hash[DM_TRACKED_CHUNK_HASH(chunk)], node) { |
237 | if (c->chunk == chunk) { | 236 | if (c->chunk == chunk) { |
238 | found = 1; | 237 | found = 1; |
diff --git a/drivers/md/persistent-data/dm-transaction-manager.c b/drivers/md/persistent-data/dm-transaction-manager.c index 7b17a1fdeaf9..81da1a26042e 100644 --- a/drivers/md/persistent-data/dm-transaction-manager.c +++ b/drivers/md/persistent-data/dm-transaction-manager.c | |||
@@ -46,10 +46,9 @@ static int is_shadow(struct dm_transaction_manager *tm, dm_block_t b) | |||
46 | int r = 0; | 46 | int r = 0; |
47 | unsigned bucket = dm_hash_block(b, DM_HASH_MASK); | 47 | unsigned bucket = dm_hash_block(b, DM_HASH_MASK); |
48 | struct shadow_info *si; | 48 | struct shadow_info *si; |
49 | struct hlist_node *n; | ||
50 | 49 | ||
51 | spin_lock(&tm->lock); | 50 | spin_lock(&tm->lock); |
52 | hlist_for_each_entry(si, n, tm->buckets + bucket, hlist) | 51 | hlist_for_each_entry(si, tm->buckets + bucket, hlist) |
53 | if (si->where == b) { | 52 | if (si->where == b) { |
54 | r = 1; | 53 | r = 1; |
55 | break; | 54 | break; |
@@ -81,14 +80,14 @@ static void insert_shadow(struct dm_transaction_manager *tm, dm_block_t b) | |||
81 | static void wipe_shadow_table(struct dm_transaction_manager *tm) | 80 | static void wipe_shadow_table(struct dm_transaction_manager *tm) |
82 | { | 81 | { |
83 | struct shadow_info *si; | 82 | struct shadow_info *si; |
84 | struct hlist_node *n, *tmp; | 83 | struct hlist_node *tmp; |
85 | struct hlist_head *bucket; | 84 | struct hlist_head *bucket; |
86 | int i; | 85 | int i; |
87 | 86 | ||
88 | spin_lock(&tm->lock); | 87 | spin_lock(&tm->lock); |
89 | for (i = 0; i < DM_HASH_SIZE; i++) { | 88 | for (i = 0; i < DM_HASH_SIZE; i++) { |
90 | bucket = tm->buckets + i; | 89 | bucket = tm->buckets + i; |
91 | hlist_for_each_entry_safe(si, n, tmp, bucket, hlist) | 90 | hlist_for_each_entry_safe(si, tmp, bucket, hlist) |
92 | kfree(si); | 91 | kfree(si); |
93 | 92 | ||
94 | INIT_HLIST_HEAD(bucket); | 93 | INIT_HLIST_HEAD(bucket); |
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 19d77a026639..697f026cb318 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -365,10 +365,9 @@ static struct stripe_head *__find_stripe(struct r5conf *conf, sector_t sector, | |||
365 | short generation) | 365 | short generation) |
366 | { | 366 | { |
367 | struct stripe_head *sh; | 367 | struct stripe_head *sh; |
368 | struct hlist_node *hn; | ||
369 | 368 | ||
370 | pr_debug("__find_stripe, sector %llu\n", (unsigned long long)sector); | 369 | pr_debug("__find_stripe, sector %llu\n", (unsigned long long)sector); |
371 | hlist_for_each_entry(sh, hn, stripe_hash(conf, sector), hash) | 370 | hlist_for_each_entry(sh, stripe_hash(conf, sector), hash) |
372 | if (sh->sector == sector && sh->generation == generation) | 371 | if (sh->sector == sector && sh->generation == generation) |
373 | return sh; | 372 | return sh; |
374 | pr_debug("__stripe %llu not in cache\n", (unsigned long long)sector); | 373 | pr_debug("__stripe %llu not in cache\n", (unsigned long long)sector); |