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: 04f0b2eaa3 ("f2fs: ioctl for removing a range from F2FS")
Fixes: b4b10061ef ("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>
This commit is contained in:
Chao Yu 2023-06-06 14:19:01 +08:00 committed by Jaegeuk Kim
parent 5079e1c0c8
commit 8bec7dd1b3

View File

@ -2181,7 +2181,9 @@ out_drop_write:
if (err) if (err)
return err; return err;
freeze_super(sbi->sb); err = freeze_super(sbi->sb);
if (err)
return err;
if (f2fs_readonly(sbi->sb)) { if (f2fs_readonly(sbi->sb)) {
thaw_super(sbi->sb); thaw_super(sbi->sb);