[Devel] [PATCH RH9] dm-ploop: Fix positive error code in ploop_prepare_reloc_index_wb()

Kirill Tkhai ktkhai at virtuozzo.com
Fri Dec 10 18:05:26 MSK 2021


Later we export this error code to .message caller,
and this is a problem, since positive return values
are reserved.

Found in scope of https://jira.sw.ru/browse/PSBM-136140
Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 drivers/md/dm-ploop-map.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/dm-ploop-map.c b/drivers/md/dm-ploop-map.c
index 3873b7000953..251ac03198fd 100644
--- a/drivers/md/dm-ploop-map.c
+++ b/drivers/md/dm-ploop-map.c
@@ -1911,5 +1911,5 @@ int ploop_prepare_reloc_index_wb(struct ploop *ploop,
 out_reset:
 	ploop_break_bat_update(ploop, md);
 out_error:
-	return errno_to_blk_status(err);
+	return err;
 }




More information about the Devel mailing list