aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/persistent-data/dm-transaction-manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/persistent-data/dm-transaction-manager.c')
-rw-r--r--drivers/md/persistent-data/dm-transaction-manager.c7
1 files changed, 3 insertions, 4 deletions
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)
81static void wipe_shadow_table(struct dm_transaction_manager *tm) 80static 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);