summaryrefslogtreecommitdiffstats
path: root/fs
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
parent3d08bcc887a1c8d12be8d81f747ffa2e8a44b67b (diff)
downloadlinux-d76ee18a8551e33ad7dbd55cac38bc7b094f3abb.tar.bz2
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')
-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);