forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-04 1543e317f1da31b75942316931e8f491a8920811
kernel/drivers/md/dm-bio-prison-v1.c
....@@ -150,11 +150,10 @@
150150 struct dm_bio_prison_cell **cell_result)
151151 {
152152 int r;
153
- unsigned long flags;
154153
155
- spin_lock_irqsave(&prison->lock, flags);
154
+ spin_lock_irq(&prison->lock);
156155 r = __bio_detain(prison, key, inmate, cell_prealloc, cell_result);
157
- spin_unlock_irqrestore(&prison->lock, flags);
156
+ spin_unlock_irq(&prison->lock);
158157
159158 return r;
160159 }
....@@ -198,11 +197,9 @@
198197 struct dm_bio_prison_cell *cell,
199198 struct bio_list *bios)
200199 {
201
- unsigned long flags;
202
-
203
- spin_lock_irqsave(&prison->lock, flags);
200
+ spin_lock_irq(&prison->lock);
204201 __cell_release(prison, cell, bios);
205
- spin_unlock_irqrestore(&prison->lock, flags);
202
+ spin_unlock_irq(&prison->lock);
206203 }
207204 EXPORT_SYMBOL_GPL(dm_cell_release);
208205
....@@ -250,12 +247,10 @@
250247 void *context,
251248 struct dm_bio_prison_cell *cell)
252249 {
253
- unsigned long flags;
254
-
255
- spin_lock_irqsave(&prison->lock, flags);
250
+ spin_lock_irq(&prison->lock);
256251 visit_fn(context, cell);
257252 rb_erase(&cell->node, &prison->cells);
258
- spin_unlock_irqrestore(&prison->lock, flags);
253
+ spin_unlock_irq(&prison->lock);
259254 }
260255 EXPORT_SYMBOL_GPL(dm_cell_visit_release);
261256
....@@ -275,11 +270,10 @@
275270 struct dm_bio_prison_cell *cell)
276271 {
277272 int r;
278
- unsigned long flags;
279273
280
- spin_lock_irqsave(&prison->lock, flags);
274
+ spin_lock_irq(&prison->lock);
281275 r = __promote_or_release(prison, cell);
282
- spin_unlock_irqrestore(&prison->lock, flags);
276
+ spin_unlock_irq(&prison->lock);
283277
284278 return r;
285279 }
....@@ -379,10 +373,9 @@
379373 int dm_deferred_set_add_work(struct dm_deferred_set *ds, struct list_head *work)
380374 {
381375 int r = 1;
382
- unsigned long flags;
383376 unsigned next_entry;
384377
385
- spin_lock_irqsave(&ds->lock, flags);
378
+ spin_lock_irq(&ds->lock);
386379 if ((ds->sweeper == ds->current_entry) &&
387380 !ds->entries[ds->current_entry].count)
388381 r = 0;
....@@ -392,7 +385,7 @@
392385 if (!ds->entries[next_entry].count)
393386 ds->current_entry = next_entry;
394387 }
395
- spin_unlock_irqrestore(&ds->lock, flags);
388
+ spin_unlock_irq(&ds->lock);
396389
397390 return r;
398391 }