]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ata: libata-scsi: Remove superfluous local_irq_save()
authorNiklas Cassel <cassel@kernel.org>
Thu, 4 Dec 2025 13:18:04 +0000 (14:18 +0100)
committerDamien Le Moal <dlemoal@kernel.org>
Mon, 15 Dec 2025 07:32:04 +0000 (16:32 +0900)
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>
drivers/ata/libata-scsi.c

index 721d3f270c8ec61da3cfc93494f675ca769ec97f..244d10e4847227537cbd7326e25066582217ea75 100644 (file)
@@ -3573,13 +3573,13 @@ static void ata_scsi_report_zones_complete(struct ata_queued_cmd *qc)
 {
        struct scsi_cmnd *scmd = qc->scsicmd;
        struct sg_mapping_iter miter;
-       unsigned long flags;
        unsigned int bytes = 0;
 
+       lockdep_assert_held(qc->ap->lock);
+
        sg_miter_start(&miter, scsi_sglist(scmd), scsi_sg_count(scmd),
                       SG_MITER_TO_SG | SG_MITER_ATOMIC);
 
-       local_irq_save(flags);
        while (sg_miter_next(&miter)) {
                unsigned int offset = 0;
 
@@ -3627,7 +3627,6 @@ static void ata_scsi_report_zones_complete(struct ata_queued_cmd *qc)
                }
        }
        sg_miter_stop(&miter);
-       local_irq_restore(flags);
 
        ata_scsi_qc_complete(qc);
 }