From: Chao Yu via Linux-f2fs-devel <linux-f2fs-devel@lists.sourceforge.net>
To: jaegeuk@kernel.org
Cc: linux-f2fs-devel@lists.sourceforge.net
Subject: [f2fs-dev] [PATCH] f2fs-tools: fix to return error value correctly
Date: Mon, 3 Nov 2025 10:30:59 +0800 [thread overview]
Message-ID: <20251103023059.2598474-1-chao@kernel.org> (raw)
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
reply other threads:[~2025-11-03 2:31 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=20251103023059.2598474-1-chao@kernel.org \
--to=linux-f2fs-devel@lists.sourceforge.net \
--cc=chao@kernel.org \
--cc=jaegeuk@kernel.org \
/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).