aboutsummaryrefslogtreecommitdiff
path: root/fs/buffer.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@us.ibm.com>2011-05-27 12:23:41 -0700
committerAl Viro <viro@zeniv.linux.org.uk>2011-05-28 01:03:21 -0400
commitd76ee18a8551e33ad7dbd55cac38bc7b094f3abb (patch)
treeb65a21c32f7ebd9213886a3a9181ed946ba69777 /fs/buffer.c
parent3d08bcc887a1c8d12be8d81f747ffa2e8a44b67b (diff)
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>
Diffstat (limited to 'fs/buffer.c')
-rw-r--r--fs/buffer.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/buffer.c b/fs/buffer.c
index 698c6b2cc46..49c9aada037 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -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);