On 12/27/18 12:33 AM, James Smart wrote:
An hba-wide lock is taken in the nvme io completion routine. The lock
covers null'ing of the nrport pointer in the cmd structure.

The nrport member isn't necessary. After extracting the pointer from
the command, the pointer was dereferenced to get the fc discovery
node pointer. But the fc discovery node pointer is alrady in the
command structure so the dereferrence was unnecessary.

Eliminated the nrport structure member and its use, which also
eliminates the port-wide lock.

Signed-off-by: Dick Kennedy <dick.kenn...@broadcom.com>
Signed-off-by: James Smart <jsmart2...@gmail.com>
---
  drivers/scsi/lpfc/lpfc_nvme.c | 30 +++++++-----------------------
  drivers/scsi/lpfc/lpfc_nvme.h |  1 -
  2 files changed, 7 insertions(+), 24 deletions(-)

Reviewed-by: Hannes Reinecke <h...@suse.com>

Cheers,

Hannes

Reply via email to