summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@us.ibm.com>2011-05-27 23:23:41 +0400
committerAl Viro <viro@zeniv.linux.org.uk>2011-05-28 09:03:21 +0400
commitd76ee18a8551e33ad7dbd55cac38bc7b094f3abb (patch)
treeb65a21c32f7ebd9213886a3a9181ed946ba69777
parent3d08bcc887a1c8d12be8d81f747ffa2e8a44b67b (diff)
downloadlinux-d76ee18a8551e33ad7dbd55cac38bc7b094f3abb.tar.xz
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>
-rw-r--r--fs/buffer.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/buffer.c b/fs/buffer.c
index 698c6b2cc462..49c9aada0374 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);