Skip to contentSkip to conversation

f2fs: Fix __write_node_folio() conversion

PATCH Applied Matthew Wilcox (Oracle) 4 participants 4 messages Jun 1, 2025 – Jun 18, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 f2fs: Fix __write_node_folio() conversion

This conversion moved the folio_unlock() to inside __write_node_folio(), but missed one caller so we had a double-unlock on this path.

Cc Christoph Hellwig <[email protected]>
Cc Chao Yu <[email protected]>
Cc Jaegeuk Kim <[email protected]>
Reported-by [email protected]
Fixes 80f31d2a7e5f (f2fs: return bool from __write_node_folio)
---
 fs/f2fs/node.c | 1 -
 1 file changed, 1 deletion(-)
fs/f2fs/node.c +0 -1
index 1cb4cba7f961..bfe104db284e 100644
@@ -2078,7 +2078,6 @@ int f2fs_sync_node_pages(struct f2fs_sb_info *sbi,
 
 			if (!__write_node_folio(folio, false, &submitted,
 					wbc, do_balance, io_type, NULL)) {
-				folio_unlock(folio);
 				folio_batch_release(&fbatch);
 				ret = -EIO;
 				goto out;
Signature · 1 line
2.47.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 2 lines · Matthew Wilcox (Oracle)

This conversion moved the folio_unlock() to inside __write_node_folio(), but missed one caller so we had a double-unlock on this path.

Looks good, thanks!

maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Matthew Wilcox (Oracle)
Quoted 9 lines · Matthew Wilcox (Oracle)

This conversion moved the folio_unlock() to inside __write_node_folio(), but missed one caller so we had a double-unlock on this path.

Cc Christoph Hellwig <[email protected]>
Cc Chao Yu <[email protected]>
Cc Jaegeuk Kim <[email protected]>
Reported-by [email protected]
Fixes 80f31d2a7e5f (f2fs: return bool from __write_node_folio)

Thanks,

#3 lore raw
In reply to Matthew Wilcox (Oracle)
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 11 lines · On Sun, 1 Jun 2025 01:26:54 +0100 you wrote:

This conversion moved the folio_unlock() to inside __write_node_folio(), but missed one caller so we had a double-unlock on this path.

Cc Christoph Hellwig <[email protected]>
Cc Chao Yu <[email protected]>
Cc Jaegeuk Kim <[email protected]>
Reported-by [email protected]
Fixes 80f31d2a7e5f (f2fs: return bool from __write_node_folio)

[...]

Here is the summary with links:
- [f2fs-dev] f2fs: Fix __write_node_folio() conversion

    https://git.kernel.org/jaegeuk/f2fs/c/6dea74e454c2

You are awesome, thank you!

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