diff options
author | attilio <attilio@FreeBSD.org> | 2013-02-20 12:03:20 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2013-02-20 12:03:20 +0000 |
commit | 15bf891afe5ecb096114725fc8e6dc1cc3ef70d6 (patch) | |
tree | 430a1525becbd2674f05fbcf81b84fccc4aa7865 /sys/security | |
parent | 1f1e13ca0304c5d3cab0d4c118678ec546f935bc (diff) | |
download | FreeBSD-src-15bf891afe5ecb096114725fc8e6dc1cc3ef70d6.zip FreeBSD-src-15bf891afe5ecb096114725fc8e6dc1cc3ef70d6.tar.gz |
Rename VM_OBJECT_LOCK(), VM_OBJECT_UNLOCK() and VM_OBJECT_TRYLOCK() to
their "write" versions.
Sponsored by: EMC / Isilon storage division
Diffstat (limited to 'sys/security')
-rw-r--r-- | sys/security/mac/mac_process.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/security/mac/mac_process.c b/sys/security/mac/mac_process.c index cb50f29..15f704d 100644 --- a/sys/security/mac/mac_process.c +++ b/sys/security/mac/mac_process.c @@ -284,14 +284,14 @@ mac_proc_vm_revoke_recurse(struct thread *td, struct ucred *cred, object = vme->object.vm_object; if (object == NULL) continue; - VM_OBJECT_LOCK(object); + VM_OBJECT_WLOCK(object); while ((backing_object = object->backing_object) != NULL) { - VM_OBJECT_LOCK(backing_object); + VM_OBJECT_WLOCK(backing_object); offset += object->backing_object_offset; - VM_OBJECT_UNLOCK(object); + VM_OBJECT_WUNLOCK(object); object = backing_object; } - VM_OBJECT_UNLOCK(object); + VM_OBJECT_WUNLOCK(object); /* * At the moment, vm_maps and objects aren't considered by * the MAC system, so only things with backing by a normal @@ -334,10 +334,10 @@ mac_proc_vm_revoke_recurse(struct thread *td, struct ucred *cred, vm_object_reference(object); (void) vn_start_write(vp, &mp, V_WAIT); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); - VM_OBJECT_LOCK(object); + VM_OBJECT_WLOCK(object); vm_object_page_clean(object, offset, offset + vme->end - vme->start, OBJPC_SYNC); - VM_OBJECT_UNLOCK(object); + VM_OBJECT_WUNLOCK(object); VOP_UNLOCK(vp, 0); vn_finished_write(mp); vm_object_deallocate(object); |