diff options
author | alc <alc@FreeBSD.org> | 2003-04-24 04:31:25 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2003-04-24 04:31:25 +0000 |
commit | 87da2c3cf37429dd7554a13d8b70a046ccc3edcf (patch) | |
tree | 524c091529a13b4f30095fe4af93a54b4cd973f6 /sys/security/mac/mac_net.c | |
parent | 51f01cb3f731c451c22c07d8bb6a6e9ecffb72d1 (diff) | |
download | FreeBSD-src-87da2c3cf37429dd7554a13d8b70a046ccc3edcf.zip FreeBSD-src-87da2c3cf37429dd7554a13d8b70a046ccc3edcf.tar.gz |
- Acquire the vm_object's lock when performing vm_object_page_clean().
- Add a parameter to vm_pageout_flush() that tells vm_pageout_flush()
whether its caller has locked the vm_object. (This is a temporary
measure to bootstrap vm_object locking.)
Diffstat (limited to 'sys/security/mac/mac_net.c')
-rw-r--r-- | sys/security/mac/mac_net.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/security/mac/mac_net.c b/sys/security/mac/mac_net.c index 9289d7f..15c95a0 100644 --- a/sys/security/mac/mac_net.c +++ b/sys/security/mac/mac_net.c @@ -2093,11 +2093,13 @@ mac_cred_mmapped_drop_perms_recurse(struct thread *td, struct ucred *cred, */ vm_object_reference(object); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td); + VM_OBJECT_LOCK(object); vm_object_page_clean(object, OFF_TO_IDX(offset), OFF_TO_IDX(offset + vme->end - vme->start + PAGE_MASK), OBJPC_SYNC); + VM_OBJECT_UNLOCK(object); VOP_UNLOCK(vp, 0, td); vm_object_deallocate(object); /* |