From: Steffen Maier Date: Tue, 4 Sep 2012 13:23:34 +0000 (+0200) Subject: [SCSI] zfcp: restore refcount check on port_remove X-Git-Tag: omap-for-v3.7-rc1/fixes-cpufreq-signed~38^2^2~45 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d99b601b63386f3395dc26a699ae703a273d9982;p=pandora-kernel.git [SCSI] zfcp: restore refcount check on port_remove 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 Reviewed-by: Heiko Carstens Cc: #2.6.33+ Signed-off-by: James Bottomley --- Reading git-diff-tree failed