diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2014-12-17 06:58:12 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2014-12-17 06:58:12 +0000 |
commit | a45b759c4782fe513ec89d5d4bb06bf38784f061 (patch) | |
tree | 2f819accb4d69bd46127e29bbe803b2c5e5ad7ae /sys/tmpfs | |
parent | 055668cf6b0974a1072d2833eb7db870dc7f43be (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.c | 8 |
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; |