diff options
author | ups <ups@FreeBSD.org> | 2006-05-25 17:16:11 +0000 |
---|---|---|
committer | ups <ups@FreeBSD.org> | 2006-05-25 17:16:11 +0000 |
commit | d193a40233ed361bf9ca9e0f20a916ea5f52995c (patch) | |
tree | f2ac3a3c863f65e336fb1af19054d9b1d90876cc /sys/nfsclient/nfs_bio.c | |
parent | 032282fd7ed46086875bc10c4810095d40fe6dc4 (diff) | |
download | FreeBSD-src-d193a40233ed361bf9ca9e0f20a916ea5f52995c.zip FreeBSD-src-d193a40233ed361bf9ca9e0f20a916ea5f52995c.tar.gz |
Call vm_object_page_clean() with the object lock held.
Submitted by: kensmith@
Reviewed by: mohans@
MFC after: 6 days
Diffstat (limited to 'sys/nfsclient/nfs_bio.c')
-rw-r--r-- | sys/nfsclient/nfs_bio.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/nfsclient/nfs_bio.c b/sys/nfsclient/nfs_bio.c index cac2175..1fd25c5 100644 --- a/sys/nfsclient/nfs_bio.c +++ b/sys/nfsclient/nfs_bio.c @@ -1313,7 +1313,9 @@ nfs_vinvalbuf(struct vnode *vp, int flags, struct thread *td, int intrflg) * Now, flush as required. */ if ((flags & V_SAVE) && (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); /* * If the page clean was interrupted, fail the invalidation. * Not doing so, we run the risk of losing dirty pages in the |