netfs: Fix netfs_page_mkwrite() to flush conflicting data, not wait
Subsystems (6)
David Howells
maintainerPATCH 1/1 netfs: Fix netfs_page_mkwrite() to flush conflicting data, not wait
Fix netfs_page_mkwrite() to use filemap_fdatawrite_range(), not filemap_fdatawait_range() to flush conflicting data.
--- fs/netfs/buffered_write.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
fs/netfs/buffered_write.c +3 -3
@@ -554,9 +554,9 @@ vm_fault_t netfs_page_mkwrite(struct vm_fault *vmf, struct netfs_group *netfs_gr group =netfs_folio_group (folio);if (group != netfs_group && group !=NETFS_FOLIO_COPY_TO_CACHE ) {folio_unlock (folio); - err =filemap_fdatawait_range (mapping, -folio_pos (folio), -folio_pos (folio) +folio_size (folio)); + err =filemap_fdatawrite_range (mapping, +folio_pos (folio), +folio_pos (folio) +folio_size (folio));switch (err) {case 0 : ret =VM_FAULT_RETRY ;
Quoted 4 lines · David Howells
Fix
netfs_page_mkwrite()to usefilemap_fdatawrite_range(), notfilemap_fdatawait_range()to flush conflicting data.
Applied to the vfs.fixes branch of the vfs/vfs.git tree. Patches in the vfs.fixes branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase, trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git branch: vfs.fixes
[1/1] netfs: Fix netfs_page_mkwrite() to flush conflicting data, not wait
https://git.kernel.org/vfs/vfs/c/9d66154f73b7