Skip to content

Commit

Permalink
target: Fix exception path pr_reg put regression for PR RELEASE
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nicholas Bellinger committed Nov 8, 2012
1 parent b69c1fc commit bb7a8c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/target/target_core_pr.c
Original file line number Diff line number Diff line change
Expand Up @@ -2604,7 +2604,7 @@ core_scsi3_emulate_pro_release(struct se_cmd *cmd, int type, int scope,
* No persistent reservation, return GOOD status.
*/
spin_unlock(&dev->dev_reservation_lock);
return 0;
goto out_put_pr_reg;
}
if ((pr_res_holder->pr_res_type == PR_TYPE_WRITE_EXCLUSIVE_ALLREG) ||
(pr_res_holder->pr_res_type == PR_TYPE_EXCLUSIVE_ACCESS_ALLREG))
Expand Down

0 comments on commit bb7a8c8

Please sign in to comment.