[PATCH 2/2] f2fs: fix return val in f2fs_start_ckpt_thread()
From: Yangtao Li
Date: Thu Oct 27 2022 - 06:25:26 EST
Return PTR_ERR(cprc->f2fs_issue_ckpt) instead of -ENOMEM;
Signed-off-by: Yangtao Li <frank.li@xxxxxxxx>
---
fs/f2fs/checkpoint.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index 2a5d9256a6f4..12fd12f2bb97 100644
--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
@@ -1899,8 +1899,9 @@ int f2fs_start_ckpt_thread(struct f2fs_sb_info *sbi)
cprc->f2fs_issue_ckpt = kthread_run(issue_checkpoint_thread, sbi,
"f2fs_ckpt-%u:%u", MAJOR(dev), MINOR(dev));
if (IS_ERR(cprc->f2fs_issue_ckpt)) {
+ int err = PTR_ERR(cprc->f2fs_issue_ckpt);
cprc->f2fs_issue_ckpt = NULL;
- return -ENOMEM;
+ return err;
}
set_task_ioprio(cprc->f2fs_issue_ckpt, cprc->ckpt_thread_ioprio);
--
2.25.1