linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] lightnvm: pblk: Fix error return code in pblk_recov_pad_lineq()
@ 2021-05-15  3:38 Zhen Lei
  0 siblings, 0 replies; only message in thread
From: Zhen Lei @ 2021-05-15  3:38 UTC (permalink / raw)
  To: Matias Bjorling, Jens Axboe, Matias Bjørling,
	Javier González, linux-block
  Cc: Zhen Lei

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



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-15  3:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-15  3:38 [PATCH 1/1] lightnvm: pblk: Fix error return code in pblk_recov_pad_lineq() Zhen Lei

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).