From: Mike Anderson <andmike@us.ibm.com>
To: James Bottomley <James.Bottomley@SteelEye.com>
Cc: linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] fix scsi process problems and clean up the target reap issues
Date: Tue, 28 Feb 2006 09:24:36 -0800 [thread overview]
Message-ID: <20060228172436.GA1456@us.ibm.com> (raw)
In-Reply-To: <1140726438.2809.18.camel@localhost.localdomain>
James Bottomley <James.Bottomley@SteelEye.com> wrote:
> static void scsi_target_reap_usercontext(void *data)
> @@ -391,21 +400,13 @@
> struct Scsi_Host *shost = dev_to_shost(starget->dev.parent);
> unsigned long flags;
>
> + transport_remove_device(&starget->dev);
> + device_del(&starget->dev);
> + transport_destroy_device(&starget->dev);
> spin_lock_irqsave(shost->host_lock, flags);
> -
> - if (--starget->reap_ref == 0 && list_empty(&starget->devices)) {
> - list_del_init(&starget->siblings);
> - spin_unlock_irqrestore(shost->host_lock, flags);
> - transport_remove_device(&starget->dev);
> - device_del(&starget->dev);
> - transport_destroy_device(&starget->dev);
> - put_device(&starget->dev);
> - return;
> -
> - }
> + list_del_init(&starget->siblings);
> spin_unlock_irqrestore(shost->host_lock, flags);
> -
> - return;
> + put_device(&starget->dev);
> }
>
> /**
The patch was tried on the aic7xxx ahc_linux_target_alloc issue I
previously mentioned and it did not change the result of a BUG_ON.
Is there some reason we cannot do the list_del_init(&starget->siblings) in
scsi_target_dev_release post calling target_destroy? It would appear with
the check for STARGET_DEL that being on the list longer should not be a
problem.
For the sdev we call the slave_destroy in __scsi_remove_device and then pull
it off the list in the release.
-andmike
--
Michael Anderson
andmike@us.ibm.com
next prev parent reply other threads:[~2006-02-28 17:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-23 20:27 [PATCH] fix scsi process problems and clean up the target reap issues James Bottomley
2006-02-28 17:24 ` Mike Anderson [this message]
2006-02-28 17:39 ` James Bottomley
2006-02-28 19:17 ` Mike Anderson
2006-02-28 19:52 ` James Bottomley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060228172436.GA1456@us.ibm.com \
--to=andmike@us.ibm.com \
--cc=James.Bottomley@SteelEye.com \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox