]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: cxlflash: Cache owning adapter within context
authorMatthew R. Ochs <mrochs@linux.vnet.ibm.com>
Tue, 9 Aug 2016 23:39:30 +0000 (18:39 -0500)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 19 Aug 2016 02:40:27 +0000 (22:40 -0400)
commitbd24303eab3092f2757146fc15ac261cf8c99d46
tree74c34834186fe032ad96911d12b25a60de4d88ed
parent2957649948283ac94eb20c07bd21a79e3c08621c
scsi: cxlflash: Cache owning adapter within context

The context removal routine requires access to the owning adapter
structure to reset the context within the AFU as part of the tear down
sequence. In order to support kref adoption, the owning adapter must be
accessible from the release handler. As the kref framework only provides
the kref reference as the sole parameter, another means is needed to
derive the owning adapter.

As a remedy, the owning adapter reference is saved off within the
context during initialization.

Signed-off-by: Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
Acked-by: Manoj N. Kumar <manoj@linux.vnet.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/cxlflash/superpipe.c
drivers/scsi/cxlflash/superpipe.h