* [PATCH V2] target:alua: fix the tg_pt_gps_count
@ 2019-03-27 13:59 tangwenji
2019-03-27 19:43 ` Mike Christie
2019-03-28 0:33 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: tangwenji @ 2019-03-27 13:59 UTC (permalink / raw)
To: target-devel
From: tangwenji <tang.wenji@zte.com.cn>
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>
---
drivers/target/target_core_alua.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/target/target_core_alua.c b/drivers/target/target_core_alua.c
index e09f0cf..893f1fe 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);
/*
--
2.5.0.windows.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH V2] target:alua: fix the tg_pt_gps_count
2019-03-27 13:59 [PATCH V2] target:alua: fix the tg_pt_gps_count tangwenji
@ 2019-03-27 19:43 ` Mike Christie
2019-03-28 0:33 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Mike Christie @ 2019-03-27 19:43 UTC (permalink / raw)
To: target-devel
On 03/27/2019 08:59 AM, tangwenji wrote:
> From: tangwenji <tang.wenji@zte.com.cn>
>
> 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>
> ---
> drivers/target/target_core_alua.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/target/target_core_alua.c b/drivers/target/target_core_alua.c
> index e09f0cf..893f1fe 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);
>
> /*
>
Looks ok to me.
Reviewed-by: Mike Christie <mchristi@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH V2] target:alua: fix the tg_pt_gps_count
2019-03-27 13:59 [PATCH V2] target:alua: fix the tg_pt_gps_count tangwenji
2019-03-27 19:43 ` Mike Christie
@ 2019-03-28 0:33 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2019-03-28 0:33 UTC (permalink / raw)
To: target-devel
tangwenji,
> Reducing the count should be alua_tg_pt_gps_count instead of
> alua_tg_pt_gps_counter when free alua group.
Applied to 5.2/scsi-queue, thanks.
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-03-28 0:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-27 13:59 [PATCH V2] target:alua: fix the tg_pt_gps_count tangwenji
2019-03-27 19:43 ` Mike Christie
2019-03-28 0:33 ` Martin K. Petersen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.