Skip to content

Commit

Permalink
fs: block_page_mkwrite should wait for writeback to finish
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Darrick J. Wong authored and Al Viro committed May 28, 2011
1 parent 3d08bcc commit d76ee18
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d76ee18

Please sign in to comment.