f2fs-tools: fix to return error value correctly
PATCH 1/1 f2fs-tools: fix to return error value correctly
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 <[email protected]>
--- fsck/main.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
fsck/main.c +8 -4
@@ -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
Signature · 8 lines
2.49.0 _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel