]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ata: libata-scsi: Improve ata_scsi_handle_link_detach()
authorDamien Le Moal <dlemoal@kernel.org>
Thu, 5 Sep 2024 02:00:59 +0000 (11:00 +0900)
committerDamien Le Moal <dlemoal@kernel.org>
Sat, 7 Sep 2024 01:16:55 +0000 (10:16 +0900)
commita16951510fae8fa9b934673404c4fc990d124ccd
tree863e2ee6c3d188d71e16c79dc787c3c4dac3aed3
parentc494708d1f680027c7cbbaa670198179774f7d4d
ata: libata-scsi: Improve ata_scsi_handle_link_detach()

A struct ata_device flags should always be set and cleared with the
device port locked. Testing for a flag should thus also be done while
holding the device port lock. In accordance to this principle, modify
ata_scsi_handle_link_detach() to test and clear the ATA_DFLAG_DETACHED
flag while holding the device port lock.

Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Niklas Cassel <cassel@kernel.org>
drivers/ata/libata-scsi.c