* [f2fs-dev] [PATCH] f2fs-tools: fix to return error value correctly
@ 2025-11-03 2:30 Chao Yu via Linux-f2fs-devel
0 siblings, 0 replies; only message in thread
From: Chao Yu via Linux-f2fs-devel @ 2025-11-03 2:30 UTC (permalink / raw)
To: jaegeuk; +Cc: linux-f2fs-devel
We missed to return error value if below functions fail, fix it.
- do_resize
- do_sload
- do_label
- do_inject
Signed-off-by: Chao Yu <chao@kernel.org>
---
fsck/main.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/fsck/main.c b/fsck/main.c
index d034dc3..f7ef092 100644
--- a/fsck/main.c
+++ b/fsck/main.c
@@ -1341,13 +1341,15 @@ fsck_again:
#endif
#ifdef WITH_RESIZE
case RESIZE:
- if (do_resize(sbi))
+ ret = do_resize(sbi);
+ if (ret)
goto out_err;
break;
#endif
#ifdef WITH_SLOAD
case SLOAD:
- if (do_sload(sbi))
+ ret = do_sload(sbi);
+ if (ret)
goto out_err;
ret = f2fs_sparse_initialize_meta(sbi);
@@ -1363,13 +1365,15 @@ fsck_again:
#endif
#ifdef WITH_LABEL
case LABEL:
- if (do_label(sbi))
+ ret = do_label(sbi);
+ if (ret)
goto out_err;
break;
#endif
#ifdef WITH_INJECT
case INJECT:
- if (do_inject(sbi))
+ ret = do_inject(sbi);
+ if (ret)
goto out_err;
break;
#endif
--
2.49.0
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2025-11-03 2:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-03 2:30 [f2fs-dev] [PATCH] f2fs-tools: fix to return error value correctly Chao Yu via Linux-f2fs-devel
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).