From cb05b60a8982e5497cd30449710deb2f4be653d4 Mon Sep 17 00:00:00 2001 From: Attilio Rao Date: Thu, 10 Jan 2008 01:10:58 +0000 Subject: vn_lock() is currently only used with the 'curthread' passed as argument. Remove this argument and pass curthread directly to underlying VOP_LOCK1() VFS method. This modify makes the code cleaner and in particular remove an annoying dependence helping next lockmgr() cleanup. KPI results, obviously, changed. Manpage and FreeBSD_version will be updated through further commits. As a side note, would be valuable to say that next commits will address a similar cleanup about VFS methods, in particular vop_lock1 and vop_unlock. Tested by: Diego Sardina , Andrea Di Pasquale --- sys/security/mac/mac_process.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/security/mac/mac_process.c') diff --git a/sys/security/mac/mac_process.c b/sys/security/mac/mac_process.c index 6ed6d9139e74..6c81e080038a 100644 --- a/sys/security/mac/mac_process.c +++ b/sys/security/mac/mac_process.c @@ -365,7 +365,7 @@ mac_cred_mmapped_drop_perms_recurse(struct thread *td, struct ucred *cred, continue; vp = (struct vnode *)object->handle; vfslocked = VFS_LOCK_GIANT(vp->v_mount); - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td); + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); result = vme->max_protection; mac_vnode_check_mmap_downgrade(cred, vp, &result); VOP_UNLOCK(vp, 0, td); @@ -401,7 +401,7 @@ mac_cred_mmapped_drop_perms_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, td); + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); VM_OBJECT_LOCK(object); vm_object_page_clean(object, OFF_TO_IDX(offset), -- cgit v1.3