Message ID | 20230307143125.27778-3-hch@lst.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/3] ufs: don't flush page immediately for DIRSYNC directories | expand |
On Tue, Mar 07, 2023 at 03:31:24PM +0100, Christoph Hellwig wrote: > 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. That one is in vfs.git #work.misc (sorry, missed -next last cycle).
diff --git a/fs/ocfs2/refcounttree.c b/fs/ocfs2/refcounttree.c index 5a656dc683f108..564ab48d03effa 100644 --- a/fs/ocfs2/refcounttree.c +++ b/fs/ocfs2/refcounttree.c @@ -2952,10 +2952,11 @@ int ocfs2_duplicate_clusters_by_page(handle_t *handle, */ 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; } }