Skip to content

Commit 8e4bfd1

Browse files
Christoph HellwigAl Viro
authored andcommitted
ocfs2: don't use write_one_page in ocfs2_duplicate_clusters_by_page
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. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Jan Kara <jack@suse.cz> Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 9e22031 commit 8e4bfd1

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

fs/ocfs2/refcounttree.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2952,10 +2952,11 @@ int ocfs2_duplicate_clusters_by_page(handle_t *handle,
29522952
*/
29532953
if (PAGE_SIZE <= OCFS2_SB(sb)->s_clustersize) {
29542954
if (PageDirty(page)) {
2955-
/*
2956-
* write_on_page will unlock the page on return
2957-
*/
2958-
ret = write_one_page(page);
2955+
unlock_page(page);
2956+
put_page(page);
2957+
2958+
ret = filemap_write_and_wait_range(mapping,
2959+
offset, map_end - 1);
29592960
goto retry;
29602961
}
29612962
}

0 commit comments

Comments
 (0)