uvm_vnp_uncache() in tmpfs_write() when a file grows in size. This
is not enough. We need to invalidate UVM's cache of the vnode every
time the contents of the vnode are modified. Failure to do so might
lead to inconsistencies between read/mmap consumers.
From Pedro Martelletto
-/* $OpenBSD: tmpfs_vnops.c,v 1.47 2021/10/23 17:38:00 patrick Exp $ */
+/* $OpenBSD: tmpfs_vnops.c,v 1.48 2021/10/23 17:39:08 patrick Exp $ */
/* $NetBSD: tmpfs_vnops.c,v 1.100 2012/11/05 17:27:39 dholland Exp $ */
/*
error = 0;
while (error == 0 && uio->uio_resid > 0) {
vsize_t len;
-
+ uvm_vnp_uncache(vp);
len = MIN(node->tn_size - uio->uio_offset, uio->uio_resid);
if (len == 0) {
break;