• James Bottomley's avatar
    [SCSI] libata: fix locking for sas paths · b8784f77
    James Bottomley authored
    For historical reasons, libsas uses the scsi host lock as the ata port
    lock, and libata always uses the ata host.  For the old eh, this was
    largely irrelevant since the two locks were never mixed inside the
    code.  However, the new eh has a case where it nests acquisition of
    the host lock inside the port lock (this does look rather deadlock
    prone).  Obviously this would be an instant deadlock if the port lock
    were the host lock, so switch the libsas paths to use the ata host
    lock as well.
    
    Cc: Tejun Heo <tj@kernel.org>
    Cc: Jeff Garzik <jeff@garzik.org>
    Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
    b8784f77
libata-scsi.c 97.5 KB