fs: block_page_mkwrite should wait for writeback to finish

For filesystems such as nilfs2 and xfs that use block_page_mkwrite, modify that
function to wait for pending writeback before allowing the page to become
writable.  This is needed to stabilize pages during writeback for those two
filesystems.

Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Darrick J. Wong 2011-05-27 12:23:41 -07:00 committed by Al Viro
parent 3d08bcc887
commit d76ee18a85
1 changed files with 1 additions and 0 deletions

View File

@ -2382,6 +2382,7 @@ int __block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf,
ret = -EAGAIN;
goto out_unlock;
}
wait_on_page_writeback(page);
return 0;
out_unlock:
unlock_page(page);