Commit 9acf5535346cb06f349ffa98ebb2408d2aa9fbca
Committed by
Greg Kroah-Hartman
1 parent
210588c034
Exists in
smarct4x-processor-sdk-linux-03.00.00.04
and in
2 other branches
Revert "scsi: fix soft lockup in scsi_remove_target() on module removal"
commit 305c2e71b3d733ec065cb716c76af7d554bd5571 upstream. Now that we've done a more comprehensive fix with the intermediate target state we can remove the previous hack introduced with commit 90a88d6ef88e ("scsi: fix soft lockup in scsi_remove_target() on module removal"). Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Ewan D. Milne <emilne@redhat.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing 1 changed file with 2 additions and 4 deletions Side-by-side Diff
drivers/scsi/scsi_sysfs.c
... | ... | @@ -1192,19 +1192,17 @@ |
1192 | 1192 | void scsi_remove_target(struct device *dev) |
1193 | 1193 | { |
1194 | 1194 | struct Scsi_Host *shost = dev_to_shost(dev->parent); |
1195 | - struct scsi_target *starget, *last_target = NULL; | |
1195 | + struct scsi_target *starget; | |
1196 | 1196 | unsigned long flags; |
1197 | 1197 | |
1198 | 1198 | restart: |
1199 | 1199 | spin_lock_irqsave(shost->host_lock, flags); |
1200 | 1200 | list_for_each_entry(starget, &shost->__targets, siblings) { |
1201 | 1201 | if (starget->state == STARGET_DEL || |
1202 | - starget->state == STARGET_REMOVE || | |
1203 | - starget == last_target) | |
1202 | + starget->state == STARGET_REMOVE) | |
1204 | 1203 | continue; |
1205 | 1204 | if (starget->dev.parent == dev || &starget->dev == dev) { |
1206 | 1205 | kref_get(&starget->reap_ref); |
1207 | - last_target = starget; | |
1208 | 1206 | starget->state = STARGET_REMOVE; |
1209 | 1207 | spin_unlock_irqrestore(shost->host_lock, flags); |
1210 | 1208 | __scsi_remove_target(starget); |