aboutsummaryrefslogtreecommitdiff
path: root/sys/vm/vm_mmap.c
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2012-03-17 23:00:32 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2012-03-17 23:00:32 +0000
commit126d60823afe6a3e65bb09ed44614aea512029af (patch)
treef682c3a5094240f4bd795d32ef82092b98ddaf50 /sys/vm/vm_mmap.c
parent15d321c5aaa6c4579b837a6cfe33ab78a57a2483 (diff)
downloadsrc-126d60823afe6a3e65bb09ed44614aea512029af.tar.gz
src-126d60823afe6a3e65bb09ed44614aea512029af.zip
In vm_object_page_clean(), do not clean OBJ_MIGHTBEDIRTY object flag
if the filesystem performed short write and we are skipping the page due to this. Propogate write error from the pager back to the callers of vm_pageout_flush(). Report the failure to write a page from the requested range as the FALSE return value from vm_object_page_clean(), and propagate it back to msync(2) to return EIO to usermode. While there, convert the clearobjflags variable in the vm_object_page_clean() and arguments of the helper functions to boolean. PR: kern/165927 Reviewed by: alc MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=233100
Diffstat (limited to 'sys/vm/vm_mmap.c')
-rw-r--r--sys/vm/vm_mmap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c
index 82bc846e0810..d9b151665ce3 100644
--- a/sys/vm/vm_mmap.c
+++ b/sys/vm/vm_mmap.c
@@ -508,6 +508,8 @@ sys_msync(td, uap)
return (EINVAL); /* Sun returns ENOMEM? */
case KERN_INVALID_ARGUMENT:
return (EBUSY);
+ case KERN_FAILURE:
+ return (EIO);
default:
return (EINVAL);
}