aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_ext.h
diff options
context:
space:
mode:
authorSteffen Maier <maier@linux.vnet.ibm.com>2012-09-04 15:23:34 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-13 05:28:09 +0900
commit9745d6cb3feb21fd6d9098317a92f2f5c1371519 (patch)
treed32af462dddf8779f055d4e7d7b47c32f4742f12 /drivers/s390/scsi/zfcp_ext.h
parent2e54c4fb47ffcc687457f9bcd9bba895f2a84963 (diff)
downloadkernel_samsung_smdk4412-9745d6cb3feb21fd6d9098317a92f2f5c1371519.zip
kernel_samsung_smdk4412-9745d6cb3feb21fd6d9098317a92f2f5c1371519.tar.gz
kernel_samsung_smdk4412-9745d6cb3feb21fd6d9098317a92f2f5c1371519.tar.bz2
SCSI: zfcp: restore refcount check on port_remove
commit d99b601b63386f3395dc26a699ae703a273d9982 upstream. Upstream commit f3450c7b917201bb49d67032e9f60d5125675d6a "[SCSI] zfcp: Replace local reference counting with common kref" accidentally dropped a reference count check before tearing down zfcp_ports that are potentially in use by zfcp_units. Even remote ports in use can be removed causing unreachable garbage objects zfcp_ports with zfcp_units. Thus units won't come back even after a manual port_rescan. The kref of zfcp_port->dev.kobj is already used by the driver core. We cannot re-use it to track the number of zfcp_units. Re-introduce our own counter for units per port and check on port_remove. Signed-off-by: Steffen Maier <maier@linux.vnet.ibm.com> Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/s390/scsi/zfcp_ext.h')
-rw-r--r--drivers/s390/scsi/zfcp_ext.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/s390/scsi/zfcp_ext.h b/drivers/s390/scsi/zfcp_ext.h
index 5830fe2..3ad6399 100644
--- a/drivers/s390/scsi/zfcp_ext.h
+++ b/drivers/s390/scsi/zfcp_ext.h
@@ -158,6 +158,7 @@ extern void zfcp_scsi_dif_sense_error(struct scsi_cmnd *, int);
extern struct attribute_group zfcp_sysfs_unit_attrs;
extern struct attribute_group zfcp_sysfs_adapter_attrs;
extern struct attribute_group zfcp_sysfs_port_attrs;
+extern struct mutex zfcp_sysfs_port_units_mutex;
extern struct device_attribute *zfcp_sysfs_sdev_attrs[];
extern struct device_attribute *zfcp_sysfs_shost_attrs[];