summaryrefslogtreecommitdiffstats
path: root/drivers/target
diff options
context:
space:
mode:
authortangwenji <tang.wenji@zte.com.cn>2019-03-27 21:59:06 +0800
committerMartin K. Petersen <martin.petersen@oracle.com>2019-03-27 20:33:07 -0400
commit82129697df9d90afd22736acd89d24f98bde2522 (patch)
tree2c6af6532d1aff4ab77decaab254d2493d0371cb /drivers/target
parent3e14592da654d53d87987aa09753d5a26e45446f (diff)
downloadtalos-op-linux-82129697df9d90afd22736acd89d24f98bde2522.tar.gz
talos-op-linux-82129697df9d90afd22736acd89d24f98bde2522.zip
scsi: target: alua: fix the tg_pt_gps_count
Reducing the count should be alua_tg_pt_gps_count instead of alua_tg_pt_gps_counter when free alua group. Signed-off-by: tangwenji <tang.wenji@zte.com.cn> Reviewed-by: Mike Christie <mchristi@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/target')
-rw-r--r--drivers/target/target_core_alua.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/target/target_core_alua.c b/drivers/target/target_core_alua.c
index e09f0cf86bed..893f1fe8e373 100644
--- a/drivers/target/target_core_alua.c
+++ b/drivers/target/target_core_alua.c
@@ -1760,8 +1760,10 @@ void core_alua_free_tg_pt_gp(
* can be made while we are releasing struct t10_alua_tg_pt_gp.
*/
spin_lock(&dev->t10_alua.tg_pt_gps_lock);
- list_del(&tg_pt_gp->tg_pt_gp_list);
- dev->t10_alua.alua_tg_pt_gps_counter--;
+ if (tg_pt_gp->tg_pt_gp_valid_id) {
+ list_del(&tg_pt_gp->tg_pt_gp_list);
+ dev->t10_alua.alua_tg_pt_gps_count--;
+ }
spin_unlock(&dev->t10_alua.tg_pt_gps_lock);
/*
OpenPOWER on IntegriCloud