aboutsummaryrefslogtreecommitdiffstats
path: root/fs/buffer.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@us.ibm.com>2011-05-27 15:23:41 -0400
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 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,
2382 ret = -EAGAIN; 2382 ret = -EAGAIN;
2383 goto out_unlock; 2383 goto out_unlock;
2384 } 2384 }
2385 wait_on_page_writeback(page);
2385 return 0; 2386 return 0;
2386out_unlock: 2387out_unlock:
2387 unlock_page(page); 2388 unlock_page(page);