diff mbox series

[08/18] lightnvm: pblk: fix spin_unlock order

Message ID 20190314160428.3559-9-igor.j.konopko@intel.com (mailing list archive)
State New, archived
Headers show
Series lightnvm: next set of improvements for 5.2 | expand

Commit Message

Igor Konopko March 14, 2019, 4:04 p.m. UTC
In pblk_rb_tear_down_check() spin_unlock() functions are not
called in proper order. This patch fixes that.

Signed-off-by: Igor Konopko <igor.j.konopko@intel.com>
---
 drivers/lightnvm/pblk-rb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Javier González March 16, 2019, 11:49 p.m. UTC | #1
> On 14 Mar 2019, at 09.04, Igor Konopko <igor.j.konopko@intel.com> wrote:
> 
> In pblk_rb_tear_down_check() spin_unlock() functions are not
> called in proper order. This patch fixes that.
> 
> Signed-off-by: Igor Konopko <igor.j.konopko@intel.com>
> ---
> drivers/lightnvm/pblk-rb.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/lightnvm/pblk-rb.c b/drivers/lightnvm/pblk-rb.c
> index 03c241b..3555014 100644
> --- a/drivers/lightnvm/pblk-rb.c
> +++ b/drivers/lightnvm/pblk-rb.c
> @@ -799,8 +799,8 @@ int pblk_rb_tear_down_check(struct pblk_rb *rb)
> 	}
> 
> out:
> -	spin_unlock(&rb->w_lock);
> 	spin_unlock_irq(&rb->s_lock);
> +	spin_unlock(&rb->w_lock);
> 
> 	return ret;
> }
> --
> 2.9.5

Ups. Thanks for fixing this...

Reviewed-by: Javier González <javier@javigon.com>
Hans Holmberg March 18, 2019, 11:55 a.m. UTC | #2
On Thu, Mar 14, 2019 at 5:08 PM Igor Konopko <igor.j.konopko@intel.com> wrote:
>
> In pblk_rb_tear_down_check() spin_unlock() functions are not
> called in proper order. This patch fixes that.

Can you add a Fixes: ?

Thanks.

Reviewed-by: Hans Holmberg <hans.holmberg@cnexlabs.com>

>
> Signed-off-by: Igor Konopko <igor.j.konopko@intel.com>
> ---
>  drivers/lightnvm/pblk-rb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/lightnvm/pblk-rb.c b/drivers/lightnvm/pblk-rb.c
> index 03c241b..3555014 100644
> --- a/drivers/lightnvm/pblk-rb.c
> +++ b/drivers/lightnvm/pblk-rb.c
> @@ -799,8 +799,8 @@ int pblk_rb_tear_down_check(struct pblk_rb *rb)
>         }
>
>  out:
> -       spin_unlock(&rb->w_lock);
>         spin_unlock_irq(&rb->s_lock);
> +       spin_unlock(&rb->w_lock);
>
>         return ret;
>  }
> --
> 2.9.5
>
diff mbox series

Patch

diff --git a/drivers/lightnvm/pblk-rb.c b/drivers/lightnvm/pblk-rb.c
index 03c241b..3555014 100644
--- a/drivers/lightnvm/pblk-rb.c
+++ b/drivers/lightnvm/pblk-rb.c
@@ -799,8 +799,8 @@  int pblk_rb_tear_down_check(struct pblk_rb *rb)
 	}
 
 out:
-	spin_unlock(&rb->w_lock);
 	spin_unlock_irq(&rb->s_lock);
+	spin_unlock(&rb->w_lock);
 
 	return ret;
 }