Skip to content

Commit 9acf553

Browse files
Johannes Thumshirngregkh
authored andcommitted
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>
1 parent 210588c commit 9acf553

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

drivers/scsi/scsi_sysfs.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,19 +1192,17 @@ static void __scsi_remove_target(struct scsi_target *starget)
11921192
void scsi_remove_target(struct device *dev)
11931193
{
11941194
struct Scsi_Host *shost = dev_to_shost(dev->parent);
1195-
struct scsi_target *starget, *last_target = NULL;
1195+
struct scsi_target *starget;
11961196
unsigned long flags;
11971197

11981198
restart:
11991199
spin_lock_irqsave(shost->host_lock, flags);
12001200
list_for_each_entry(starget, &shost->__targets, siblings) {
12011201
if (starget->state == STARGET_DEL ||
1202-
starget->state == STARGET_REMOVE ||
1203-
starget == last_target)
1202+
starget->state == STARGET_REMOVE)
12041203
continue;
12051204
if (starget->dev.parent == dev || &starget->dev == dev) {
12061205
kref_get(&starget->reap_ref);
1207-
last_target = starget;
12081206
starget->state = STARGET_REMOVE;
12091207
spin_unlock_irqrestore(shost->host_lock, flags);
12101208
__scsi_remove_target(starget);

0 commit comments

Comments
 (0)