Call uvm_vnp_uncache() in tmpfs_write(). We currently only call
authorpatrick <patrick@openbsd.org>
Sat, 23 Oct 2021 17:39:08 +0000 (17:39 +0000)
committerpatrick <patrick@openbsd.org>
Sat, 23 Oct 2021 17:39:08 +0000 (17:39 +0000)
commit9720dc3374ac4331396d59d0a4da6751c88670c6
tree59ac6b3c57402b1ed79825a5e1dd6f533ea2705d
parentba6398e891f85d56f62222e2a156b354313f3cb9
Call uvm_vnp_uncache() in tmpfs_write().  We currently only call
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
sys/tmpfs/tmpfs_vnops.c