* [PATCH] dm-bio-prison-v2: replace spin_lock_irqsave with spin_lock_irq
@ 2019-10-23 13:39 Mikulas Patocka
0 siblings, 0 replies; only message in thread
From: Mikulas Patocka @ 2019-10-23 13:39 UTC (permalink / raw)
To: Mike Snitzer, Joe Thornber, Alasdair Kergon; +Cc: dm-devel
Replace spin_lock_irqsave/irqrestore with spin_lock_irq/spin_unlock_irq.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
---
drivers/md/dm-bio-prison-v2.c | 26 ++++++++++----------------
1 file changed, 10 insertions(+), 16 deletions(-)
Index: linux-2.6/drivers/md/dm-bio-prison-v2.c
===================================================================
--- linux-2.6.orig/drivers/md/dm-bio-prison-v2.c 2019-10-10 16:52:03.000000000 +0200
+++ linux-2.6/drivers/md/dm-bio-prison-v2.c 2019-10-16 17:08:47.000000000 +0200
@@ -177,11 +177,10 @@ bool dm_cell_get_v2(struct dm_bio_prison
struct dm_bio_prison_cell_v2 **cell_result)
{
int r;
- unsigned long flags;
- spin_lock_irqsave(&prison->lock, flags);
+ spin_lock_irq(&prison->lock);
r = __get(prison, key, lock_level, inmate, cell_prealloc, cell_result);
- spin_unlock_irqrestore(&prison->lock, flags);
+ spin_unlock_irq(&prison->lock);
return r;
}
@@ -261,11 +260,10 @@ int dm_cell_lock_v2(struct dm_bio_prison
struct dm_bio_prison_cell_v2 **cell_result)
{
int r;
- unsigned long flags;
- spin_lock_irqsave(&prison->lock, flags);
+ spin_lock_irq(&prison->lock);
r = __lock(prison, key, lock_level, cell_prealloc, cell_result);
- spin_unlock_irqrestore(&prison->lock, flags);
+ spin_unlock_irq(&prison->lock);
return r;
}
@@ -285,11 +283,9 @@ void dm_cell_quiesce_v2(struct dm_bio_pr
struct dm_bio_prison_cell_v2 *cell,
struct work_struct *continuation)
{
- unsigned long flags;
-
- spin_lock_irqsave(&prison->lock, flags);
+ spin_lock_irq(&prison->lock);
__quiesce(prison, cell, continuation);
- spin_unlock_irqrestore(&prison->lock, flags);
+ spin_unlock_irq(&prison->lock);
}
EXPORT_SYMBOL_GPL(dm_cell_quiesce_v2);
@@ -309,11 +305,10 @@ int dm_cell_lock_promote_v2(struct dm_bi
unsigned new_lock_level)
{
int r;
- unsigned long flags;
- spin_lock_irqsave(&prison->lock, flags);
+ spin_lock_irq(&prison->lock);
r = __promote(prison, cell, new_lock_level);
- spin_unlock_irqrestore(&prison->lock, flags);
+ spin_unlock_irq(&prison->lock);
return r;
}
@@ -342,11 +337,10 @@ bool dm_cell_unlock_v2(struct dm_bio_pri
struct bio_list *bios)
{
bool r;
- unsigned long flags;
- spin_lock_irqsave(&prison->lock, flags);
+ spin_lock_irq(&prison->lock);
r = __unlock(prison, cell, bios);
- spin_unlock_irqrestore(&prison->lock, flags);
+ spin_unlock_irq(&prison->lock);
return r;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-10-23 13:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-23 13:39 [PATCH] dm-bio-prison-v2: replace spin_lock_irqsave with spin_lock_irq Mikulas Patocka
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.