From d193a40233ed361bf9ca9e0f20a916ea5f52995c Mon Sep 17 00:00:00 2001 From: ups Date: Thu, 25 May 2006 17:16:11 +0000 Subject: Call vm_object_page_clean() with the object lock held. Submitted by: kensmith@ Reviewed by: mohans@ MFC after: 6 days --- sys/fs/nwfs/nwfs_io.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sys/fs/nwfs') diff --git a/sys/fs/nwfs/nwfs_io.c b/sys/fs/nwfs/nwfs_io.c index 84ae3cd..b74cd4a 100644 --- a/sys/fs/nwfs/nwfs_io.c +++ b/sys/fs/nwfs/nwfs_io.c @@ -612,8 +612,11 @@ nwfs_vinvalbuf(vp, td) } np->n_flag |= NFLUSHINPROG; - if (vp->v_bufobj.bo_object != NULL) + if (vp->v_bufobj.bo_object != NULL) { + VM_OBJECT_LOCK(vp->v_bufobj.bo_object); vm_object_page_clean(vp->v_bufobj.bo_object, 0, 0, OBJPC_SYNC); + VM_OBJECT_UNLOCK(vp->v_bufobj.bo_object); + } error = vinvalbuf(vp, V_SAVE, td, PCATCH, 0); while (error) { -- cgit v1.1