irq_poll: Fix irq_poll_sched()
authorBart Van Assche <bart.vanassche@sandisk.com>
Thu, 31 Dec 2015 08:56:03 +0000 (09:56 +0100)
committerDoug Ledford <dledford@redhat.com>
Tue, 19 Jan 2016 20:26:55 +0000 (15:26 -0500)
The IRQ_POLL_F_SCHED bit is set as long as polling is ongoing.
This means that irq_poll_sched() must proceed if this bit has
not yet been set.

Fixes: commit ea51190c0315 ("irq_poll: fold irq_poll_sched_prep into irq_poll_sched").
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
lib/irq_poll.c

index 2836620e889f5681a4780fcfea496fc4b9230117..836f7db4e548e8142b09f8b6d147d926d42a3f99 100644 (file)
@@ -29,7 +29,7 @@ void irq_poll_sched(struct irq_poll *iop)
 
        if (test_bit(IRQ_POLL_F_DISABLE, &iop->state))
                return;
-       if (!test_and_set_bit(IRQ_POLL_F_SCHED, &iop->state))
+       if (test_and_set_bit(IRQ_POLL_F_SCHED, &iop->state))
                return;
 
        local_irq_save(flags);