Skip to content
Commit e63ed0d7 authored by James Bottomley's avatar James Bottomley
Browse files

[SCSI] fix our current target reap infrastructure



This patch eliminates the reap_ref and replaces it with a proper kref.
On last put of this kref, the target is removed from visibility in
sysfs.  The final call to scsi_target_reap() for the device is done from
__scsi_remove_device() and only if the device was made visible.  This
ensures that the target disappears as soon as the last device is gone
rather than waiting until final release of the device (which is often
too long).

Reviewed-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Tested-by: default avatarSarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@vger.kernel.org # delay backport by 2 months for field testing
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent 81b86d4d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment