mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
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>
This commit is contained in:
parent
9e22031a5a
commit
8e4bfd1364
1 changed files with 5 additions and 4 deletions
|
@ -2952,10 +2952,11 @@ retry:
|
||||||
*/
|
*/
|
||||||
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue