]> asedeno.scripts.mit.edu Git - linux.git/commit
scsi: libfc: Revisit kref handling
authorHannes Reinecke <hare@suse.de>
Fri, 30 Sep 2016 09:01:14 +0000 (11:01 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 8 Nov 2016 22:29:46 +0000 (17:29 -0500)
commit4d2095cc42a2d8062590891f929d9d694cbd927f
tree43145025e43f3bfc2341ca8e4b4b2c711dfe3e5c
parent3bc45af81d0dff722c5a2d5d009f2d2d91b52b56
scsi: libfc: Revisit kref handling

The kref handling in fc_rport is a mess. This patch updates
the kref handling according to the following rules:

- Take a reference whenever scheduling a workqueue
- Take a reference whenever an ELS command is send
- Drop the reference at the end of the workqueue function
- Drop the reference at the end of handling ELS replies
- Take a reference when allocating an rport
- Drop the reference when removing an rport

Signed-off-by: Hannes Reinecke <hare@suse.com>
Acked-by: Johannes Thumshirn <jth@kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/libfc/fc_rport.c