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
This commit is contained in:
Konstantin Belousov 2012-02-24 10:41:58 +00:00
parent 06eb5e92e2
commit 9d22083da8

View File

@ -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,