summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/vm/vm_map.c4
-rw-r--r--sys/vm/vm_mmap.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index e2c4c8ea538f..ce192419e3ca 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -1985,10 +1985,10 @@ vm_map_sync(
end = entry->end;
}
/*
- * Make a first pass to check for holes.
+ * Make a first pass to check for user-wired memory and holes.
*/
for (current = entry; current->start < end; current = current->next) {
- if (current->eflags & MAP_ENTRY_IS_SUB_MAP) {
+ if (invalidate && (current->eflags & MAP_ENTRY_USER_WIRED)) {
vm_map_unlock_read(map);
return (KERN_INVALID_ARGUMENT);
}
diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c
index 9025c4692e58..6356910e850d 100644
--- a/sys/vm/vm_mmap.c
+++ b/sys/vm/vm_mmap.c
@@ -558,8 +558,8 @@ msync(td, uap)
return (0);
case KERN_INVALID_ADDRESS:
return (EINVAL); /* Sun returns ENOMEM? */
- case KERN_FAILURE:
- return (EIO);
+ case KERN_INVALID_ARGUMENT:
+ return (EBUSY);
default:
return (EINVAL);
}