From bb7a8c8eb9678666fb05f3bc542581365399a161 Mon Sep 17 00:00:00 2001 From: Nicholas Bellinger Date: Tue, 6 Nov 2012 15:46:25 -0800 Subject: 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 Cc: Roland Dreier Signed-off-by: Nicholas Bellinger --- drivers/target/target_core_pr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/target/target_core_pr.c') diff --git a/drivers/target/target_core_pr.c b/drivers/target/target_core_pr.c index ffbe0ea9bba..d7101a4d7a3 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, * 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)) -- cgit v1.2.3