summaryrefslogtreecommitdiff
path: root/sys/tmpfs
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2014-12-17 06:58:12 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2014-12-17 06:58:12 +0000
commita45b759c4782fe513ec89d5d4bb06bf38784f061 (patch)
tree2f819accb4d69bd46127e29bbe803b2c5e5ad7ae /sys/tmpfs
parent055668cf6b0974a1072d2833eb7db870dc7f43be (diff)
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')
-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;