diff options
author | attilio <attilio@FreeBSD.org> | 2008-01-13 14:44:15 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2008-01-13 14:44:15 +0000 |
commit | 71b7824213151e91b40ee4afa9fa7f100c90ed0b (patch) | |
tree | 880b0acaab5ef09fe469c4b041d99ff26adca8b8 /sys/vm | |
parent | 28827547bbae974e5ca23ee55d1ba558da366885 (diff) | |
download | FreeBSD-src-71b7824213151e91b40ee4afa9fa7f100c90ed0b.zip FreeBSD-src-71b7824213151e91b40ee4afa9fa7f100c90ed0b.tar.gz |
VOP_LOCK1() (and so VOP_LOCK()) and VOP_UNLOCK() are only used in
conjuction with 'thread' argument passing which is always curthread.
Remove the unuseful extra-argument and pass explicitly curthread to lower
layer functions, when necessary.
KPI results broken by this change, which should affect several ports, so
version bumping and manpage update will be further committed.
Tested by: kris, pho, Diego Sardina <siarodx at gmail dot com>
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/swap_pager.c | 6 | ||||
-rw-r--r-- | sys/vm/vm_contig.c | 2 | ||||
-rw-r--r-- | sys/vm/vm_object.c | 2 | ||||
-rw-r--r-- | sys/vm/vnode_pager.c | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index 2350cf3..21a9826 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -2120,7 +2120,7 @@ swapoff_one(struct swdevt *sp, struct ucred *cred) #ifdef MAC (void) vn_lock(sp->sw_vp, LK_EXCLUSIVE | LK_RETRY); error = mac_system_check_swapoff(cred, sp->sw_vp); - (void) VOP_UNLOCK(sp->sw_vp, 0, curthread); + (void) VOP_UNLOCK(sp->sw_vp, 0); if (error != 0) return (error); #endif @@ -2467,7 +2467,7 @@ swapongeom(struct thread *td, struct vnode *vp) error = g_waitfor_event(swapongeom_ev, &swh, M_WAITOK, NULL); if (!error) error = swh.error; - VOP_UNLOCK(vp, 0, td); + VOP_UNLOCK(vp, 0); return (error); } @@ -2533,7 +2533,7 @@ swaponvp(struct thread *td, struct vnode *vp, u_long nblks) if (error == 0) #endif error = VOP_OPEN(vp, FREAD | FWRITE, td->td_ucred, td, NULL); - (void) VOP_UNLOCK(vp, 0, td); + (void) VOP_UNLOCK(vp, 0); if (error) return (error); diff --git a/sys/vm/vm_contig.c b/sys/vm/vm_contig.c index cb12aec..8fec101 100644 --- a/sys/vm/vm_contig.c +++ b/sys/vm/vm_contig.c @@ -127,7 +127,7 @@ vm_contig_launder_page(vm_page_t m, vm_page_t *next) VM_OBJECT_LOCK(object); vm_object_page_clean(object, 0, 0, OBJPC_SYNC); VM_OBJECT_UNLOCK(object); - VOP_UNLOCK(vp, 0, curthread); + VOP_UNLOCK(vp, 0); VFS_UNLOCK_GIANT(vfslocked); vm_object_deallocate(object); vn_finished_write(mp); diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index 49fdc42..9df34ea 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -1055,7 +1055,7 @@ vm_object_sync(vm_object_t object, vm_ooffset_t offset, vm_size_t size, OFF_TO_IDX(offset + size + PAGE_MASK), flags); VM_OBJECT_UNLOCK(object); - VOP_UNLOCK(vp, 0, curthread); + VOP_UNLOCK(vp, 0); VFS_UNLOCK_GIANT(vfslocked); vn_finished_write(mp); VM_OBJECT_LOCK(object); diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c index 5a752d9..4d6cea2 100644 --- a/sys/vm/vnode_pager.c +++ b/sys/vm/vnode_pager.c @@ -112,7 +112,7 @@ vnode_create_vobject(struct vnode *vp, off_t isize, struct thread *td) VM_OBJECT_UNLOCK(object); return (0); } - VOP_UNLOCK(vp, 0, td); + VOP_UNLOCK(vp, 0); vm_object_set_flag(object, OBJ_DISCONNECTWNT); msleep(object, VM_OBJECT_MTX(object), PDROP | PVM, "vodead", 0); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); |