The patch titled Subject: ocfs2: don't use write_one_page in ocfs2_duplicate_clusters_by_page has been added to the -mm mm-nonmm-unstable branch. Its filename is ocfs2-dont-use-write_one_page-in-ocfs2_duplicate_clusters_by_page.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/ocfs2-dont-use-write_one_page-in-ocfs2_duplicate_clusters_by_page.patch This patch will later appear in the mm-nonmm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Christoph Hellwig <hch@xxxxxx> Subject: ocfs2: don't use write_one_page in ocfs2_duplicate_clusters_by_page Date: Wed, 18 Jan 2023 18:30:27 +0100 Use filemap_write_and_wait_range to write back the range of the dirty page instead of write_one_page in preparation of removing write_one_page and eventually ->writepage. Link: https://lkml.kernel.org/r/20230118173027.294869-8-hch@xxxxxx Signed-off-by: Christoph Hellwig <hch@xxxxxx> Reviewed-by: Jan Kara <jack@xxxxxxx> Reviewed-by: Joseph Qi <joseph.qi@xxxxxxxxxxxxxxxxx> Cc: Evgeniy Dushistov <dushistov@xxxxxxx> Cc: Joel Becker <jlbec@xxxxxxxxxxxx> Cc: Mark Fasheh <mark@xxxxxxxxxx> Cc: Matthew Wilcox <willy@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/ocfs2/refcounttree.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) --- a/fs/ocfs2/refcounttree.c~ocfs2-dont-use-write_one_page-in-ocfs2_duplicate_clusters_by_page +++ a/fs/ocfs2/refcounttree.c @@ -2952,10 +2952,11 @@ retry: */ if (PAGE_SIZE <= OCFS2_SB(sb)->s_clustersize) { if (PageDirty(page)) { - /* - * write_on_page will unlock the page on return - */ - ret = write_one_page(page); + unlock_page(page); + put_page(page); + + ret = filemap_write_and_wait_range(mapping, + offset, map_end - 1); goto retry; } } _ Patches currently in -mm which might be from hch@xxxxxx are fs-remove-an-outdated-comment-on-mpage_writepages.patch ntfs3-stop-using-generic_writepages.patch ntfs3-remove-writepage.patch jbd2ocfs2-move-jbd2_journal_submit_inode_data_buffers-to-ocfs2.patch ocfs2-use-filemap_fdatawrite_wbc-instead-of-generic_writepages.patch mm-remove-generic_writepages.patch minix-move-releasing-pages-into-unlink-and-rename.patch minix-fix-error-handling-in-minix_delete_entry.patch minix-fix-error-handling-in-minix_set_link.patch minix-dont-flush-page-immediately-for-dirsync-directories.patch sysv-dont-flush-page-immediately-for-dirsync-directories.patch ufs-dont-flush-page-immediately-for-dirsync-directories.patch ocfs2-dont-use-write_one_page-in-ocfs2_duplicate_clusters_by_page.patch