From ab7b0ae578c4ced40414f23fa55badeea27a350d Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Thu, 1 May 2003 03:51:05 +0000 Subject: [PATCH] Lock an update to a vm_object's ref_count. --- sys/kern/vfs_default.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/kern/vfs_default.c b/sys/kern/vfs_default.c index 7e3f295cc37..cef1a0f8460 100644 --- a/sys/kern/vfs_default.c +++ b/sys/kern/vfs_default.c @@ -605,7 +605,9 @@ retry: * Dereference the reference we just created. This assumes * that the object is associated with the vp. */ + VM_OBJECT_LOCK(object); object->ref_count--; + VM_OBJECT_UNLOCK(object); vrele(vp); } else { if (object->flags & OBJ_DEAD) {