summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_fault.c
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2015-02-11 09:02:21 +0000
committerkib <kib@FreeBSD.org>2015-02-11 09:02:21 +0000
commit7ca5c317aee117a4f147780b44663907203afc11 (patch)
tree544d9b4141cc31e9d2012916d768135800fbd2ca /sys/vm/vm_fault.c
parentf5a4512544e1004f761b474f350ae4ebd61bb09c (diff)
downloadFreeBSD-src-7ca5c317aee117a4f147780b44663907203afc11.zip
FreeBSD-src-7ca5c317aee117a4f147780b44663907203afc11.tar.gz
MFC r277828:
Update mtime for tmpfs files modified through memory mapping. MFC r277969: Update both ctime and mtime for writes to tmpfs files. MFC r277972: Remove single-use boolean. MFC r278151: Remove duplicated assignment.
Diffstat (limited to 'sys/vm/vm_fault.c')
-rw-r--r--sys/vm/vm_fault.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c
index 3f3c62b..dfbc2bd 100644
--- a/sys/vm/vm_fault.c
+++ b/sys/vm/vm_fault.c
@@ -358,11 +358,13 @@ RetryFault:;
(fault_flags & (VM_FAULT_CHANGE_WIRING | VM_FAULT_DIRTY)) == 0 &&
/* avoid calling vm_object_set_writeable_dirty() */
((prot & VM_PROT_WRITE) == 0 ||
- fs.first_object->type != OBJT_VNODE ||
+ (fs.first_object->type != OBJT_VNODE &&
+ (fs.first_object->flags & OBJ_TMPFS_NODE) == 0) ||
(fs.first_object->flags & OBJ_MIGHTBEDIRTY) != 0)) {
VM_OBJECT_RLOCK(fs.first_object);
if ((prot & VM_PROT_WRITE) != 0 &&
- fs.first_object->type == OBJT_VNODE &&
+ (fs.first_object->type == OBJT_VNODE ||
+ (fs.first_object->flags & OBJ_TMPFS_NODE) != 0) &&
(fs.first_object->flags & OBJ_MIGHTBEDIRTY) == 0)
goto fast_failed;
m = vm_page_lookup(fs.first_object, fs.first_pindex);
OpenPOWER on IntegriCloud