summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2012-02-24 10:41:58 +0000
committerkib <kib@FreeBSD.org>2012-02-24 10:41:58 +0000
commit8c39852ba5c6a853cb1ebffc0e431a5d36d247b8 (patch)
tree1c4eb89aa2b7d42fd53c0bb59276891d891af839 /sys/vm
parent650071cf2cfa56ac704106b9ccf2aea77d3530f2 (diff)
downloadFreeBSD-src-8c39852ba5c6a853cb1ebffc0e431a5d36d247b8.zip
FreeBSD-src-8c39852ba5c6a853cb1ebffc0e431a5d36d247b8.tar.gz
Place the if() at the right location, to activate the v_writecount
accounting for shared writeable mappings for all filesystems, not only for the bypass layers. Submitted by: alc Pointy hat to: kib MFC after: 20 days
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vm_mmap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c
index 885c968..bf5a8be 100644
--- a/sys/vm/vm_mmap.c
+++ b/sys/vm/vm_mmap.c
@@ -1272,10 +1272,10 @@ vm_mmap_vnode(struct thread *td, vm_size_t objsize,
VFS_UNLOCK_GIANT(vfslocked);
return (error);
}
- if (locktype == LK_EXCLUSIVE) {
- *writecounted = TRUE;
- vnode_pager_update_writecount(obj, 0, objsize);
- }
+ }
+ if (locktype == LK_EXCLUSIVE) {
+ *writecounted = TRUE;
+ vnode_pager_update_writecount(obj, 0, objsize);
}
} else if (vp->v_type == VCHR) {
error = vm_mmap_cdev(td, objsize, prot, maxprotp, flagsp,
OpenPOWER on IntegriCloud