]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: ibmvfc: Init/free event pool during queue allocation/free
authorTyrel Datwyler <tyreld@linux.ibm.com>
Thu, 14 Jan 2021 20:31:30 +0000 (14:31 -0600)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 15 Jan 2021 03:27:43 +0000 (22:27 -0500)
commitbd1115a32944c0ba2065aa0629a63764afccd527
treeddc658d30a958e62b10d123c020e347cdfc2b737
parente45871ef050a1860af311190dbb5d699d41c82c8
scsi: ibmvfc: Init/free event pool during queue allocation/free

The event pool and CRQ used to be separate entities of the adapter host
structure and as such were allocated and freed independently of each
other. Recent work as defined a generic queue structure with an event pool
specific to each queue. As such the event pool for each queue shouldn't be
allocated/freed independently, but instead performed as part of the queue
allocation/free routines.

Move the calls to ibmvfc_event_pool_{init|free} into
ibmvfc_{alloc|free}_queue respectively. The only functional change here is
that the CRQ cannot be released in ibmvfc_remove until after the event pool
has been successfully purged since releasing the queue will also free the
event pool.

Link: https://lore.kernel.org/r/20210114203148.246656-4-tyreld@linux.ibm.com
Reviewed-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ibmvscsi/ibmvfc.c