target:alua: fix the tg_pt_gps_count
PATCH v2 1/1 target:alua: fix the tg_pt_gps_count
From: tangwenji <[email protected]>
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 <[email protected]>
--- drivers/target/target_core_alua.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/target/target_core_alua.c +4 -2
@@ -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);/*
Signature · 1 line
2.5.0.windows.1
Quoted 17 lines · tangwenji
From: tangwenji <[email protected]>
Reducing the count should be
alua_tg_pt_gps_countinstead ofalua_tg_pt_gps_counterwhen free alua group.Signed-off-by tangwenji <[email protected]>--- drivers/target/target_core_alua.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)drivers/target/target_core_alua.c +0
-0@@ -1760,8 +1760,10 @@ void core_alua_free_tg_pt_gp(* can be made while we are releasing struct t10_alua_tg_pt_gp. */
drivers/target/target_core_alua.c void core_alua_free_tg_pt_gp( · line 1769
Quoted 10 lines
drivers/target/target_core_alua.c +4
-2spin_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);/*
Looks ok to me.
Reviewed-by Mike Christie <[email protected]>
Martin K. Petersen
Appliedtangwenji,
Quoted 2 lines
Reducing the count should be
alua_tg_pt_gps_countinstead ofalua_tg_pt_gps_counterwhen free alua group.
Applied to 5.2/scsi-queue, thanks.
Signature · 1 line
Martin K. Petersen Oracle Linux Engineering