VOP_PUTPAGES must release the uobj's lock for us, so ensure it's locked
beforehand and unlocked afterwards using LOCK_ASSERT().
This commit is contained in:
parent
da3f862846
commit
cc8633edd3
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: uvm_vnode.c,v 1.52 2001/09/15 20:36:47 chs Exp $ */
|
||||
/* $NetBSD: uvm_vnode.c,v 1.53 2001/09/22 22:33:16 sommerfeld Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Charles D. Cranor and Washington University.
|
||||
@ -247,7 +247,7 @@ uvn_detach(uobj)
|
||||
/*
|
||||
* uvn_put: flush page data to backing store.
|
||||
*
|
||||
* => object must be locked! we will _unlock_ it before starting I/O.
|
||||
* => object must be locked on entry! VOP_PUTPAGES must unlock it.
|
||||
* => flags: PGO_SYNCIO -- use sync. I/O
|
||||
* => note: caller must set PG_CLEAN and pmap_clear_modify (if needed)
|
||||
*/
|
||||
@ -262,7 +262,9 @@ uvn_put(uobj, off, len, flags)
|
||||
struct vnode *vp = (struct vnode *)uobj;
|
||||
int error;
|
||||
|
||||
LOCK_ASSERT(simple_lock_held(&vp->v_interlock));
|
||||
error = VOP_PUTPAGES(vp, off, len, flags);
|
||||
LOCK_ASSERT(!simple_lock_held(&vp->v_interlock));
|
||||
return error;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user