Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <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: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

authored by

Matthew Wilcox (Oracle) and committed by
Jaegeuk Kim
6dea74e4 19272b37

-1
-1
fs/f2fs/node.c
··· 2078 2078 2079 2079 if (!__write_node_folio(folio, false, &submitted, 2080 2080 wbc, do_balance, io_type, NULL)) { 2081 - folio_unlock(folio); 2082 2081 folio_batch_release(&fbatch); 2083 2082 ret = -EIO; 2084 2083 goto out;