summaryrefslogtreecommitdiffstats
path: root/fs/f2fs
diff options
context:
space:
mode:
authorChao Yu <chao@kernel.org>2023-06-06 08:19:01 +0200
committerJaegeuk Kim <jaegeuk@kernel.org>2023-06-26 15:07:08 +0200
commit8bec7dd1b3f7d7769d433d67bde404de948a2d95 (patch)
tree4564d24b35552acafdd2a56d06b48e27b0462513 /fs/f2fs
parentf2fs: avoid dead loop in f2fs_issue_checkpoint() (diff)
downloadlinux-8bec7dd1b3f7d7769d433d67bde404de948a2d95.tar.xz
linux-8bec7dd1b3f7d7769d433d67bde404de948a2d95.zip
f2fs: check return value of freeze_super()
freeze_super() can fail, it needs to check its return value and do error handling in f2fs_resize_fs(). Fixes: 04f0b2eaa3b3 ("f2fs: ioctl for removing a range from F2FS") Fixes: b4b10061ef98 ("f2fs: refactor resize_fs to avoid meta updates in progress") Signed-off-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/gc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index 339c4ba67eb7..01effd3fcb6c 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -2181,7 +2181,9 @@ out_drop_write:
if (err)
return err;
- freeze_super(sbi->sb);
+ err = freeze_super(sbi->sb);
+ if (err)
+ return err;
if (f2fs_readonly(sbi->sb)) {
thaw_super(sbi->sb);