diff options
| author | John Garry <john.garry@linux.dev> | 2026-08-31 09:58:21 +0000 |
|---|---|---|
| committer | Martin K. Petersen (Oracle) <mkp@kernel.org> | 2026-09-01 22:46:18 -0400 |
| commit | e83b47309f73313e75c3888d7839666aba5b2b2a (patch) | |
| tree | f3afe7304a8e2b56fe751d19f9984b0cd5a237c3 /drivers/scsi/libfc | |
| parent | 401b5781ab9182b28a1c6c4e262cc5e1e7716fbb (diff) | |
| download | linux-next-e83b47309f73313e75c3888d7839666aba5b2b2a.tar.gz linux-next-e83b47309f73313e75c3888d7839666aba5b2b2a.zip | |
scsi: core: Drop Scsi_Host.default_lock
Back in the 2.6.xx days, it was possible to for low-level drivers to set
the shost lock pointer. That is why there is a default lock and a
pointer to the shost lock.
However, support for this has long been removed, so drop
Scsi_Host.default_lock and make Scsi_Host.host_lock as the actual lock.
Getting the address of embedded host_lock structure just requires adding
a fixed offset value to the shost pointer. However, getting the value of
the host_lock pointer requires loading from a fixed offset to the shost
pointer. The latter should be very slightly slower, which is relevant as
this lock is used a lot throughout the core code and drivers.
Signed-off-by: John Garry <john.garry@linux.dev>
Acked-by: Damien Le Moal <dlemoal@kernel.org> # ata parts
Reviewed-by: Hannes Reinecke <hare@kernel.org>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Link: https://patch.msgid.link/20260831095821.3486994-1-john.g.garry@oracle.com
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
Diffstat (limited to 'drivers/scsi/libfc')
| -rw-r--r-- | drivers/scsi/libfc/fc_fcp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c index a5139e43ca4c..60a675aa5a99 100644 --- a/drivers/scsi/libfc/fc_fcp.c +++ b/drivers/scsi/libfc/fc_fcp.c @@ -358,7 +358,7 @@ static void fc_fcp_can_queue_ramp_up(struct fc_lport *lport) unsigned long flags; int can_queue; - spin_lock_irqsave(lport->host->host_lock, flags); + spin_lock_irqsave(&lport->host->host_lock, flags); if (si->last_can_queue_ramp_up_time && (time_before(jiffies, si->last_can_queue_ramp_up_time + @@ -381,7 +381,7 @@ static void fc_fcp_can_queue_ramp_up(struct fc_lport *lport) "can_queue to %d.\n", can_queue); unlock: - spin_unlock_irqrestore(lport->host->host_lock, flags); + spin_unlock_irqrestore(&lport->host->host_lock, flags); } /** @@ -401,7 +401,7 @@ static bool fc_fcp_can_queue_ramp_down(struct fc_lport *lport) int can_queue; bool changed = false; - spin_lock_irqsave(lport->host->host_lock, flags); + spin_lock_irqsave(&lport->host->host_lock, flags); if (si->last_can_queue_ramp_down_time && (time_before(jiffies, si->last_can_queue_ramp_down_time + @@ -418,7 +418,7 @@ static bool fc_fcp_can_queue_ramp_down(struct fc_lport *lport) changed = true; unlock: - spin_unlock_irqrestore(lport->host->host_lock, flags); + spin_unlock_irqrestore(&lport->host->host_lock, flags); return changed; } |
