diff mbox series

block: Don't disable interrupts in trigger_softirq()

Message ID 20191118110122.50070-1-bigeasy@linutronix.de (mailing list archive)
State New, archived
Headers show
Series block: Don't disable interrupts in trigger_softirq() | expand

Commit Message

Sebastian Andrzej Siewior Nov. 18, 2019, 11:01 a.m. UTC
trigger_softirq() is always invoked as a SMP-function call which is
always invoked with disables interrupts.

Don't disable interrupt in trigger_softirq() because interrupts are
already disabled.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 block/blk-softirq.c | 4 ----
 1 file changed, 4 deletions(-)

Comments

Ming Lei Nov. 18, 2019, 12:49 p.m. UTC | #1
On Mon, Nov 18, 2019 at 7:03 PM Sebastian Andrzej Siewior
<bigeasy@linutronix.de> wrote:
>
> trigger_softirq() is always invoked as a SMP-function call which is
> always invoked with disables interrupts.
>
> Don't disable interrupt in trigger_softirq() because interrupts are
> already disabled.
>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> ---
>  block/blk-softirq.c | 4 ----
>  1 file changed, 4 deletions(-)
>
> diff --git a/block/blk-softirq.c b/block/blk-softirq.c
> index 457d9ba3eb204..6e7ec87d49faa 100644
> --- a/block/blk-softirq.c
> +++ b/block/blk-softirq.c
> @@ -42,17 +42,13 @@ static __latent_entropy void blk_done_softirq(struct softirq_action *h)
>  static void trigger_softirq(void *data)
>  {
>         struct request *rq = data;
> -       unsigned long flags;
>         struct list_head *list;
>
> -       local_irq_save(flags);
>         list = this_cpu_ptr(&blk_cpu_done);
>         list_add_tail(&rq->ipi_list, list);
>
>         if (list->next == &rq->ipi_list)
>                 raise_softirq_irqoff(BLOCK_SOFTIRQ);
> -
> -       local_irq_restore(flags);
>  }

Reviewed-by: Ming Lei <ming.lei@redhat.com>
Jens Axboe Nov. 18, 2019, 2:29 p.m. UTC | #2
On 11/18/19 4:01 AM, Sebastian Andrzej Siewior wrote:
> trigger_softirq() is always invoked as a SMP-function call which is
> always invoked with disables interrupts.
> 
> Don't disable interrupt in trigger_softirq() because interrupts are
> already disabled.

Applied, thanks.
diff mbox series

Patch

diff --git a/block/blk-softirq.c b/block/blk-softirq.c
index 457d9ba3eb204..6e7ec87d49faa 100644
--- a/block/blk-softirq.c
+++ b/block/blk-softirq.c
@@ -42,17 +42,13 @@  static __latent_entropy void blk_done_softirq(struct softirq_action *h)
 static void trigger_softirq(void *data)
 {
 	struct request *rq = data;
-	unsigned long flags;
 	struct list_head *list;
 
-	local_irq_save(flags);
 	list = this_cpu_ptr(&blk_cpu_done);
 	list_add_tail(&rq->ipi_list, list);
 
 	if (list->next == &rq->ipi_list)
 		raise_softirq_irqoff(BLOCK_SOFTIRQ);
-
-	local_irq_restore(flags);
 }
 
 /*