summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_subr.c
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2002-12-15 05:41:56 +0000
committeralc <alc@FreeBSD.org>2002-12-15 05:41:56 +0000
commit6be448f26468f28f11e6cc26927f2108360832cf (patch)
treebb988d4f185b95f920211bdab8e34890c943522d /sys/kern/vfs_subr.c
parentfdf35b6cdb02da94956ac62c984a745d410c4db2 (diff)
downloadFreeBSD-src-6be448f26468f28f11e6cc26927f2108360832cf.zip
FreeBSD-src-6be448f26468f28f11e6cc26927f2108360832cf.tar.gz
Perform vm_object_lock() and vm_object_unlock() around
vm_object_page_remove().
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r--sys/kern/vfs_subr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 240f3ce..3c578d5 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -1171,8 +1171,10 @@ vinvalbuf(vp, flags, cred, td, slpflag, slptimeo)
* Destroy the copy in the VM cache, too.
*/
if (VOP_GETVOBJECT(vp, &object) == 0) {
+ vm_object_lock(object);
vm_object_page_remove(object, 0, 0,
(flags & V_SAVE) ? TRUE : FALSE);
+ vm_object_unlock(object);
}
#ifdef INVARIANTS
OpenPOWER on IntegriCloud