Commit 8e4bfd13 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Al Viro

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: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarJan Kara <jack@suse.cz>
Reviewed-by: default avatarJoseph Qi <joseph.qi@linux.alibaba.com>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 9e22031a
...@@ -2952,10 +2952,11 @@ int ocfs2_duplicate_clusters_by_page(handle_t *handle, ...@@ -2952,10 +2952,11 @@ int ocfs2_duplicate_clusters_by_page(handle_t *handle,
*/ */
if (PAGE_SIZE <= OCFS2_SB(sb)->s_clustersize) { if (PAGE_SIZE <= OCFS2_SB(sb)->s_clustersize) {
if (PageDirty(page)) { if (PageDirty(page)) {
/* unlock_page(page);
* write_on_page will unlock the page on return put_page(page);
*/
ret = write_one_page(page); ret = filemap_write_and_wait_range(mapping,
offset, map_end - 1);
goto retry; goto retry;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment