Skip to content

Commit d76ee18

Browse files
Darrick J. WongAl Viro
authored andcommitted
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>
1 parent 3d08bcc commit d76ee18

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎fs/buffer.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2382,6 +2382,7 @@ int __block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf,
23822382
ret = -EAGAIN;
23832383
goto out_unlock;
23842384
}
2385+
wait_on_page_writeback(page);
23852386
return 0;
23862387
out_unlock:
23872388
unlock_page(page);

0 commit comments

Comments
 (0)