All of lore.kernel.org
 help / color / mirror / Atom feed
From: wenxiong@linux.vnet.ibm.com
To: James.Bottomley@HansenPartnership.com
Cc: linux-scsi@vger.kernel.org, klebers@linux.vnet.ibm.com,
	brking@linux.vnet.ibm.com,
	Wen Xiong <wenxiong@linux.vnet.ibm.com>
Subject: [PATCH 1/1] ipr: Fix several unlock issues in ipr driver
Date: Wed, 02 Jan 2013 16:26:38 -0600	[thread overview]
Message-ID: <20130102222700.693011987@linux.vnet.ibm.com> (raw)
In-Reply-To: 20130102222637.134060560@linux.vnet.ibm.com

[-- Attachment #1: lock_bugs --]
[-- Type: text/plain, Size: 1082 bytes --]

This patch fixes several unlock issues in ipr driver.

Signed-off-by: Wen Xiong <wenxiong@linux.vnet.ibm.com>
---
 drivers/scsi/ipr.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Index: b/drivers/scsi/ipr.c
===================================================================
--- a/drivers/scsi/ipr.c	2013-01-02 15:10:03.000000000 -0600
+++ b/drivers/scsi/ipr.c	2013-01-02 15:13:49.572476277 -0600
@@ -4985,8 +4985,8 @@ static int __ipr_eh_dev_reset(struct scs
 					ipr_cmd->qc->flags |= ATA_QCFLAG_FAILED;
 				}
 			}
-		spin_unlock(&hrrq->_lock);
 		}
+		spin_unlock(&hrrq->_lock);
 	}
 	res->resetting_device = 1;
 	scmd_printk(KERN_ERR, scsi_cmd, "Resetting device\n");
@@ -5006,8 +5006,8 @@ static int __ipr_eh_dev_reset(struct scs
 					rc = -EIO;
 					break;
 				}
-			spin_unlock(&hrrq->_lock);
 			}
+			spin_unlock(&hrrq->_lock);
 		}
 	} else
 		rc = ipr_device_reset(ioa_cfg, res);
@@ -6663,6 +6663,7 @@ static unsigned int ipr_qc_issue(struct 
 
 	default:
 		WARN_ON(1);
+		spin_unlock(&ipr_cmd->hrrq->_lock);
 		return AC_ERR_INVALID;
 	}
 

-- 

  reply	other threads:[~2013-01-02 22:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-02 22:26 [PATCH 0/1] Fix several unlock issues in ipr driver wenxiong
2013-01-02 22:26 ` wenxiong [this message]
2013-01-02 22:36   ` [PATCH 1/1] ipr: " Brian King

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=20130102222700.693011987@linux.vnet.ibm.com \
    --to=wenxiong@linux.vnet.ibm.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=brking@linux.vnet.ibm.com \
    --cc=klebers@linux.vnet.ibm.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.