diff options
| author | Alan Cox <alc@FreeBSD.org> | 2003-11-09 22:09:04 +0000 |
|---|---|---|
| committer | Alan Cox <alc@FreeBSD.org> | 2003-11-09 22:09:04 +0000 |
| commit | 637315ed9cfa6bf5fbad54adb32280509c88d812 (patch) | |
| tree | e01c4379016581f313959e38c98f7afddfeecae1 /sys/vm/vm_map.c | |
| parent | 65b5d095971a4a5647c4d8a67ef888ab188c0749 (diff) | |
Notes
Diffstat (limited to 'sys/vm/vm_map.c')
| -rw-r--r-- | sys/vm/vm_map.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c index 40db4c13a992..0fb7fc1c7f1f 100644 --- a/sys/vm/vm_map.c +++ b/sys/vm/vm_map.c @@ -1952,6 +1952,13 @@ done: * If syncio is TRUE, dirty pages are written synchronously. * If invalidate is TRUE, any cached pages are freed as well. * + * If the size of the region from start to end is zero, we are + * supposed to flush all modified pages within the region containing + * start. Unfortunately, a region can be split or coalesced with + * neighboring regions, making it difficult to determine what the + * original region was. Therefore, we approximate this requirement by + * flushing the current region containing start. + * * Returns an error if any part of the specified range is not mapped. */ int @@ -1973,6 +1980,9 @@ vm_map_sync( if (!vm_map_lookup_entry(map, start, &entry)) { vm_map_unlock_read(map); return (KERN_INVALID_ADDRESS); + } else if (start == end) { + start = entry->start; + end = entry->end; } /* * Make a first pass to check for holes. |
