Skip to contentSkip to conversation

f2fs: check return value of freeze_super()

PATCH Applied Chao Yu 2 participants 2 messages Jun 6, 2023 – Jun 12, 2023 F2FS file system

lore
Share & tools
lore

Chao Yu

author maintainer
#0 lore raw

PATCH 1/1 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")
---
 fs/f2fs/gc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
fs/f2fs/gc.c +3 -1
index 8cbe4839f640..de893f4f60e1 100644
@@ -2271,7 +2271,9 @@ int f2fs_resize_fs(struct file *filp, __u64 block_count)
 	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);
Signature · 8 lines
2.40.1



_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
#1 lore raw
This patch was applied to jaegeuk/f2fs.git (dev) by Jaegeuk Kim <[email protected]>:

Hello:

This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <[email protected]>:

Quoted 8 lines · On Tue, 6 Jun 2023 14:19:01 +0800 you wrote:

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")

[...]

Here is the summary with links:
- [f2fs-dev] f2fs: check return value of freeze_super()

    https://git.kernel.org/jaegeuk/f2fs/c/e6fd55c1f4b6

You are awesome, thank you!

Signature · 10 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html




_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel