summaryrefslogtreecommitdiffstats
path: root/sys/tmpfs/tmpfs_subr.c
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2014-12-17 06:58:10 +0000
committerguenther <guenther@openbsd.org>2014-12-17 06:58:10 +0000
commit15cd87076d7959d8eb2e3456a50f217caec420f8 (patch)
tree732c5e7373cc0a81ca12e419e2d3066d46f478f3 /sys/tmpfs/tmpfs_subr.c
parentdelete archaic simplelock use. (diff)
downloadwireguard-openbsd-15cd87076d7959d8eb2e3456a50f217caec420f8.tar.xz
wireguard-openbsd-15cd87076d7959d8eb2e3456a50f217caec420f8.zip
Prefer MADV_* over POSIX_MADV_* in kernel for consistency: the latter
doesn't have all the values and therefore can't be used everywhere. ok deraadt@ kettenis@
Diffstat (limited to 'sys/tmpfs/tmpfs_subr.c')
-rw-r--r--sys/tmpfs/tmpfs_subr.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/tmpfs/tmpfs_subr.c b/sys/tmpfs/tmpfs_subr.c
index bb42fffd93a..c3c13abbf53 100644
--- a/sys/tmpfs/tmpfs_subr.c
+++ b/sys/tmpfs/tmpfs_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmpfs_subr.c,v 1.10 2014/12/15 02:24:23 guenther Exp $ */
+/* $OpenBSD: tmpfs_subr.c,v 1.11 2014/12/17 06:58:11 guenther Exp $ */
/* $NetBSD: tmpfs_subr.c,v 1.79 2012/03/13 18:40:50 elad Exp $ */
/*
@@ -1230,10 +1230,10 @@ tmpfs_uiomove(tmpfs_node_t *node, struct uio *uio, vsize_t len)
if (len >= TMPFS_UIO_MAXBYTES) {
sz = TMPFS_UIO_MAXBYTES;
- adv = POSIX_MADV_NORMAL;
+ adv = MADV_NORMAL;
} else {
sz = len;
- adv = POSIX_MADV_SEQUENTIAL;
+ adv = MADV_SEQUENTIAL;
}
if (tmpfs_uio_cached(node))
@@ -1270,7 +1270,7 @@ tmpfs_zeropg(tmpfs_node_t *node, voff_t pgnum, vaddr_t pgoff)
error = uvm_map(kernel_map, &va, PAGE_SIZE, node->tn_uobj, pgnum, 0,
UVM_MAPFLAG(PROT_READ | PROT_WRITE, PROT_READ | PROT_WRITE,
- MAP_INHERIT_NONE, POSIX_MADV_NORMAL, 0));
+ MAP_INHERIT_NONE, MADV_NORMAL, 0));
if (error) {
uao_detach(node->tn_uobj); /* Drop reference. */
return error;