linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] f2fs: Fix __write_node_folio() conversion
@ 2025-06-01  0:26 Matthew Wilcox (Oracle)
  2025-06-02  5:00 ` Christoph Hellwig
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Matthew Wilcox (Oracle) @ 2025-06-01  0:26 UTC (permalink / raw)
  To: linux-f2fs-devel, linux-fsdevel
  Cc: Matthew Wilcox (Oracle), Christoph Hellwig, Chao Yu, Jaegeuk Kim,
	syzbot+c0dc46208750f063d0e0

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 <hch@lst.de>
Cc: Chao Yu <chao@kernel.org>
Cc: Jaegeuk Kim <jaegeuk@kernel.org>
Reported-by: syzbot+c0dc46208750f063d0e0@syzkaller.appspotmail.com
Fixes: 80f31d2a7e5f (f2fs: return bool from __write_node_folio)
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 fs/f2fs/node.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index 1cb4cba7f961..bfe104db284e 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -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;
-- 
2.47.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] f2fs: Fix __write_node_folio() conversion
  2025-06-01  0:26 [PATCH] f2fs: Fix __write_node_folio() conversion Matthew Wilcox (Oracle)
@ 2025-06-02  5:00 ` Christoph Hellwig
  2025-06-03  6:31 ` Chao Yu
  2025-06-18 21:40 ` [f2fs-dev] " patchwork-bot+f2fs
  2 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2025-06-02  5:00 UTC (permalink / raw)
  To: Matthew Wilcox (Oracle)
  Cc: linux-f2fs-devel, linux-fsdevel, Christoph Hellwig, Chao Yu,
	Jaegeuk Kim, syzbot+c0dc46208750f063d0e0

On Sun, Jun 01, 2025 at 01:26:54AM +0100, Matthew Wilcox (Oracle) 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.

Looks good, thanks!

Reviewed-by: Christoph Hellwig <hch@lst.de>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] f2fs: Fix __write_node_folio() conversion
  2025-06-01  0:26 [PATCH] f2fs: Fix __write_node_folio() conversion Matthew Wilcox (Oracle)
  2025-06-02  5:00 ` Christoph Hellwig
@ 2025-06-03  6:31 ` Chao Yu
  2025-06-18 21:40 ` [f2fs-dev] " patchwork-bot+f2fs
  2 siblings, 0 replies; 4+ messages in thread
From: Chao Yu @ 2025-06-03  6:31 UTC (permalink / raw)
  To: Matthew Wilcox (Oracle), linux-f2fs-devel, linux-fsdevel
  Cc: chao, Christoph Hellwig, Jaegeuk Kim, syzbot+c0dc46208750f063d0e0

On 2025/6/1 8:26, Matthew Wilcox (Oracle) 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 <hch@lst.de>
> Cc: Chao Yu <chao@kernel.org>
> Cc: Jaegeuk Kim <jaegeuk@kernel.org>
> Reported-by: syzbot+c0dc46208750f063d0e0@syzkaller.appspotmail.com
> Fixes: 80f31d2a7e5f (f2fs: return bool from __write_node_folio)
> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>

Reviewed-by: Chao Yu <chao@kernel.org>

Thanks,

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [f2fs-dev] [PATCH] f2fs: Fix __write_node_folio() conversion
  2025-06-01  0:26 [PATCH] f2fs: Fix __write_node_folio() conversion Matthew Wilcox (Oracle)
  2025-06-02  5:00 ` Christoph Hellwig
  2025-06-03  6:31 ` Chao Yu
@ 2025-06-18 21:40 ` patchwork-bot+f2fs
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+f2fs @ 2025-06-18 21:40 UTC (permalink / raw)
  To: Matthew Wilcox
  Cc: linux-f2fs-devel, linux-fsdevel, jaegeuk, hch,
	syzbot+c0dc46208750f063d0e0

Hello:

This patch was applied to jaegeuk/f2fs.git (dev)
by Jaegeuk Kim <jaegeuk@kernel.org>:

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 <hch@lst.de>
> Cc: Chao Yu <chao@kernel.org>
> Cc: Jaegeuk Kim <jaegeuk@kernel.org>
> Reported-by: syzbot+c0dc46208750f063d0e0@syzkaller.appspotmail.com
> Fixes: 80f31d2a7e5f (f2fs: return bool from __write_node_folio)
> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
> 
> [...]

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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-06-18 21:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-01  0:26 [PATCH] f2fs: Fix __write_node_folio() conversion Matthew Wilcox (Oracle)
2025-06-02  5:00 ` Christoph Hellwig
2025-06-03  6:31 ` Chao Yu
2025-06-18 21:40 ` [f2fs-dev] " patchwork-bot+f2fs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).