All of lore.kernel.org
 help / color / mirror / Atom feed
From: malahal@us.ibm.com
To: James Bottomley <James.Bottomley@SteelEye.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH] cleanup after a discovery error
Date: Mon, 30 Oct 2006 12:23:02 -0800	[thread overview]
Message-ID: <20061030202302.GA22870@us.ibm.com> (raw)
In-Reply-To: <1161284938.11219.22.camel@mulgrave.il.steeleye.com>

James Bottomley [James.Bottomley@SteelEye.com] wrote:
> 
> This is a bit of a layering violation
> 
> if the various discover functions are going to return an error, I think
> it's their job to clean up whatever they did before returning.
> 
> James

Hope this works better.
Signed-off-by: Malahal Naineni <malahal@us.ibm.com>

diff -r 80de69a94159 drivers/scsi/libsas/sas_discover.c
--- a/drivers/scsi/libsas/sas_discover.c	Wed Oct 25 13:28:31 2006 -0700
+++ b/drivers/scsi/libsas/sas_discover.c	Mon Oct 30 11:55:21 2006 -0800
@@ -684,6 +684,11 @@ static void sas_discover_domain(void *da
 	}
 
 	if (error) {
+		sas_rphy_delete(port->port_dev->rphy);
+		port->port_dev->rphy = NULL;
+		spin_lock(&port->dev_list_lock);
+		list_del_init(&port->port_dev->dev_list_node);
+		spin_unlock(&port->dev_list_lock);
 		kfree(port->port_dev); /* not kobject_register-ed yet */
 		port->port_dev = NULL;
 	}

  reply	other threads:[~2006-10-30 20:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-19  3:19 [PATCH] cleanup after a discovery error malahal
2006-10-19 19:08 ` James Bottomley
2006-10-30 20:23   ` malahal [this message]
2006-11-07 20:01     ` Darrick J. Wong

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=20061030202302.GA22870@us.ibm.com \
    --to=malahal@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.