Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ata: libata-scsi: Remove superfluous local_irq_save()

Commit 28a3fc2295a7 ("libata: implement ZBC IN translation") added
ata_scsi_report_zones_complete(). Since the beginning, this function
has disabled IRQs on the local CPU using local_irq_save().

qc->complete_fn is always called with ap->lock held, and the ap->lock
is always taken using spin_lock_irq*().

Thus, this local_irq_save() is superfluous and can be removed.

Signed-off-by: Niklas Cassel <cassel@kernel.org>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>

authored by

Niklas Cassel and committed by
Damien Le Moal
e8fe0981 8f0b4cce

+2 -3
+2 -3
drivers/ata/libata-scsi.c
··· 3573 3573 { 3574 3574 struct scsi_cmnd *scmd = qc->scsicmd; 3575 3575 struct sg_mapping_iter miter; 3576 - unsigned long flags; 3577 3576 unsigned int bytes = 0; 3577 + 3578 + lockdep_assert_held(qc->ap->lock); 3578 3579 3579 3580 sg_miter_start(&miter, scsi_sglist(scmd), scsi_sg_count(scmd), 3580 3581 SG_MITER_TO_SG | SG_MITER_ATOMIC); 3581 3582 3582 - local_irq_save(flags); 3583 3583 while (sg_miter_next(&miter)) { 3584 3584 unsigned int offset = 0; 3585 3585 ··· 3627 3627 } 3628 3628 } 3629 3629 sg_miter_stop(&miter); 3630 - local_irq_restore(flags); 3631 3630 3632 3631 ata_scsi_qc_complete(qc); 3633 3632 }