diff options
author | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-11-06 18:46:25 -0500 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2012-11-07 23:12:06 -0500 |
commit | bb7a8c8eb9678666fb05f3bc542581365399a161 (patch) | |
tree | 9b4b406da47b94b363f06039b4a42013ef10c108 | |
parent | b69c1fcf0a7cb2b7dff12ce4e8506b395431a52c (diff) |
target: Fix exception path pr_reg put regression for PR RELEASE
Fix a regression bug in core_scsi3_emulate_pro_release() where
should still be getting released via core_scsi3_put_pr_reg() during
No persistent reservation, with returing GOOD status.
Use goto statement here to follow converted code from hch.
Cc: Christoph Hellwig <hch@lst.de>
Cc: Roland Dreier <roland@purestorage.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
-rw-r--r-- | drivers/target/target_core_pr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c index ffbe0ea9bbad..d7101a4d7a31 100644 --- a/drivers/target/target_core_pr.c +++ b/drivers/target/target_core_pr.c | |||
@@ -2604,7 +2604,7 @@ core_scsi3_emulate_pro_release(struct se_cmd *cmd, int type, int scope, | |||
2604 | * No persistent reservation, return GOOD status. | 2604 | * No persistent reservation, return GOOD status. |
2605 | */ | 2605 | */ |
2606 | spin_unlock(&dev->dev_reservation_lock); | 2606 | spin_unlock(&dev->dev_reservation_lock); |
2607 | return 0; | 2607 | goto out_put_pr_reg; |
2608 | } | 2608 | } |
2609 | if ((pr_res_holder->pr_res_type == PR_TYPE_WRITE_EXCLUSIVE_ALLREG) || | 2609 | if ((pr_res_holder->pr_res_type == PR_TYPE_WRITE_EXCLUSIVE_ALLREG) || |
2610 | (pr_res_holder->pr_res_type == PR_TYPE_EXCLUSIVE_ACCESS_ALLREG)) | 2610 | (pr_res_holder->pr_res_type == PR_TYPE_EXCLUSIVE_ACCESS_ALLREG)) |