linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zhen Lei <thunder.leizhen@huawei.com>
To: "Matias Bjorling" <mb@lightnvm.io>,
	"Jens Axboe" <axboe@kernel.dk>,
	"Matias Bjørling" <matias@cnexlabs.com>,
	"Javier González" <jg@lightnvm.io>,
	linux-block <linux-block@vger.kernel.org>
Cc: Zhen Lei <thunder.leizhen@huawei.com>
Subject: [PATCH 1/1] lightnvm: pblk: Fix error return code in pblk_recov_pad_lineq()
Date: Sat, 15 May 2021 11:38:44 +0800	[thread overview]
Message-ID: <20210515033844.6930-1-thunder.leizhen@huawei.com> (raw)

Fix to return -EFAULT from the error handling case instead of 0, as done
elsewhere in this function.

Fixes: ee8d5c1ad54e ("lightnvm: pblk: remove target using async. I/Os")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
---
 drivers/lightnvm/pblk-recovery.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/lightnvm/pblk-recovery.c b/drivers/lightnvm/pblk-recovery.c
index 0e6f0c76e93027a..0772bd46bf61495 100644
--- a/drivers/lightnvm/pblk-recovery.c
+++ b/drivers/lightnvm/pblk-recovery.c
@@ -207,6 +207,7 @@ static int pblk_recov_pad_line(struct pblk *pblk, struct pblk_line *line,
 next_pad_rq:
 	rq_ppas = pblk_calc_secs(pblk, left_ppas, 0, false);
 	if (rq_ppas < pblk->min_write_pgs) {
+		ret = -EFAULT;
 		pblk_err(pblk, "corrupted pad line %d\n", line->id);
 		goto fail_complete;
 	}
-- 
2.26.0.106.g9fadedd



                 reply	other threads:[~2021-05-15  3:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210515033844.6930-1-thunder.leizhen@huawei.com \
    --to=thunder.leizhen@huawei.com \
    --cc=axboe@kernel.dk \
    --cc=jg@lightnvm.io \
    --cc=linux-block@vger.kernel.org \
    --cc=matias@cnexlabs.com \
    --cc=mb@lightnvm.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).