summaryrefslogtreecommitdiffstats
path: root/sys/fs/tmpfs
diff options
context:
space:
mode:
authoravg <avg@FreeBSD.org>2010-09-15 10:31:27 +0000
committeravg <avg@FreeBSD.org>2010-09-15 10:31:27 +0000
commit65a73d5f0bc196813f74ef8c29064264eb2b1b1b (patch)
tree7e2ec66a62832d2a905776b8b26f5ba5636b02fa /sys/fs/tmpfs
parent357ed349fcc5816790eeefc4435e7a885ae60e2a (diff)
downloadFreeBSD-src-65a73d5f0bc196813f74ef8c29064264eb2b1b1b.zip
FreeBSD-src-65a73d5f0bc196813f74ef8c29064264eb2b1b1b.tar.gz
tmpfs, zfs + sendfile: mark page bits as valid after populating it with data
Otherwise, adding insult to injury, in addition to double-caching of data we would always copy the data into a vnode's vm object page from backend. This is specific to sendfile case only (VOP_READ with UIO_NOCOPY). PR: kern/141305 Reported by: Wiktor Niesiobedzki <bsd@vink.pl> Reviewed by: alc Tested by: tools/regression/sockets/sendfile MFC after: 2 weeks
Diffstat (limited to 'sys/fs/tmpfs')
-rw-r--r--sys/fs/tmpfs/tmpfs_vnops.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/fs/tmpfs/tmpfs_vnops.c b/sys/fs/tmpfs/tmpfs_vnops.c
index d3f1ff5..f1768320 100644
--- a/sys/fs/tmpfs/tmpfs_vnops.c
+++ b/sys/fs/tmpfs/tmpfs_vnops.c
@@ -562,6 +562,8 @@ lookupvpg:
sf_buf_free(sf);
sched_unpin();
VM_OBJECT_LOCK(vobj);
+ if (error == 0)
+ vm_page_set_valid(m, offset, tlen);
vm_page_wakeup(m);
VM_OBJECT_UNLOCK(vobj);
return (error);
OpenPOWER on IntegriCloud