Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1628685 > unrolled thread

[PATCH 2/5] lightnvm: pblk: fix bad error check

Started by"Javier González" <jg@lightnvm.io>
First post2017-04-22 01:40 +0200
Last post2017-04-22 11:00 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 2/5] lightnvm: pblk: fix bad error check "Javier González" <jg@lightnvm.io> - 2017-04-22 01:40 +0200
    Re: [PATCH 2/5] lightnvm: pblk: fix bad error check Matias Bjørling <mb@lightnvm.io> - 2017-04-22 11:00 +0200

#1628685 — [PATCH 2/5] lightnvm: pblk: fix bad error check

From"Javier González" <jg@lightnvm.io>
Date2017-04-22 01:40 +0200
Subject[PATCH 2/5] lightnvm: pblk: fix bad error check
Message-ID<tyQjD-3De-9@gated-at.bofh.it>
Fix bad error check

Fixes: a4bd217b4326 "lightnvm: physical block device (pblk) target"

Signed-off-by: Javier González <javier@cnexlabs.com>
---
 drivers/lightnvm/pblk-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/lightnvm/pblk-core.c b/drivers/lightnvm/pblk-core.c
index 7065658..7eb62ec 100644
--- a/drivers/lightnvm/pblk-core.c
+++ b/drivers/lightnvm/pblk-core.c
@@ -1273,7 +1273,7 @@ struct pblk_line *pblk_line_replace_data(struct pblk *pblk)
 retry_setup:
 	if (!pblk_line_set_metadata(pblk, new, cur)) {
 		new = pblk_line_retry(pblk, new);
-		if (new)
+		if (!new)
 			return NULL;
 
 		goto retry_setup;
-- 
2.7.4

[toc] | [next] | [standalone]


#1628806

FromMatias Bjørling <mb@lightnvm.io>
Date2017-04-22 11:00 +0200
Message-ID<tyZ3z-DT-1@gated-at.bofh.it>
In reply to#1628685
On 04/22/2017 01:32 AM, Javier González wrote:
> Fix bad error check
>
> Fixes: a4bd217b4326 "lightnvm: physical block device (pblk) target"
>
> Signed-off-by: Javier González <javier@cnexlabs.com>
> ---
>  drivers/lightnvm/pblk-core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/lightnvm/pblk-core.c b/drivers/lightnvm/pblk-core.c
> index 7065658..7eb62ec 100644
> --- a/drivers/lightnvm/pblk-core.c
> +++ b/drivers/lightnvm/pblk-core.c
> @@ -1273,7 +1273,7 @@ struct pblk_line *pblk_line_replace_data(struct pblk *pblk)
>  retry_setup:
>  	if (!pblk_line_set_metadata(pblk, new, cur)) {
>  		new = pblk_line_retry(pblk, new);
> -		if (new)
> +		if (!new)
>  			return NULL;
>
>  		goto retry_setup;
>

Reviewed-by: Matias Bjørling <matias@cnexlabs.com>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web