Skip to content

Commit d76ee18

Browse files
Darrick J. WongAl Viro
Darrick J. Wong
authored and
Al Viro
committed
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 <[email protected]> Signed-off-by: Al Viro <[email protected]>
1 parent 3d08bcc commit d76ee18

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

fs/buffer.c

+1
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)