diff options
author | Darrick J. Wong <djwong@us.ibm.com> | 2011-05-27 12:23:41 -0700 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-05-28 01:03:21 -0400 |
commit | d76ee18a8551e33ad7dbd55cac38bc7b094f3abb (patch) | |
tree | b65a21c32f7ebd9213886a3a9181ed946ba69777 | |
parent | 3d08bcc887a1c8d12be8d81f747ffa2e8a44b67b (diff) | |
download | linux-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>
-rw-r--r-- | fs/buffer.c | 1 |
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); |