OSDN Git Service

scsi: lpfc: cleanup: remove nrport from nvme command structure
authorJames Smart <jsmart2021@gmail.com>
Mon, 28 Jan 2019 19:14:17 +0000 (11:14 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 6 Feb 2019 03:22:42 +0000 (22:22 -0500)
commit0b05e9fe1fd1d6a4f80449743f146dfe162907fc
tree30c336e812b8e0c25894e3cd660bd9c40c4541e9
parentb8837a0f885184bcad347b23a3e640e5735471d7
scsi: lpfc: cleanup: remove nrport from nvme command structure

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.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_nvme.c
drivers/scsi/lpfc/lpfc_nvme.h