Date: Tue, 1 Oct 2002 13:18:28 -0700 (PDT) From: John Baldwin <jhb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 18494 for review Message-ID: <200210012018.g91KISoF078854@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=18494 Change 18494 by jhb@jhb_laptop on 2002/10/01 13:17:47 Add some code to handle a case that may not even need to be handled but is alluded to in an XXX comment. Affected files ... .. //depot/projects/smpng/sys/vm/vnode_pager.c#18 edit Differences ... ==== //depot/projects/smpng/sys/vm/vnode_pager.c#18 (text+ko) ==== @@ -1065,6 +1065,7 @@ vm_object_t object; { struct thread *td = curthread; /* XXX */ + struct vnode *vp; GIANT_REQUIRED; @@ -1076,13 +1077,21 @@ } /* XXX; If object->handle can change, we need to cache it. */ - while (vget(object->handle, - LK_NOPAUSE | LK_SHARED | LK_RETRY | LK_CANRECURSE, td)){ + vp = object->handle; + while (vget(vp, + LK_NOPAUSE | LK_SHARED | LK_RETRY | LK_CANRECURSE, td)) { if ((object->flags & OBJ_DEAD) || (object->type != OBJT_VNODE)) return NULL; + vp = object->handle; printf("vnode_pager_lock: retrying\n"); } - return object->handle; + KASSERT((object->flags & OBJ_DEAD) == 0, + ("vnode_pager_lock: object is dead")); + KASSERT(object->type == OBJT_VNODE, + ("vnode_pager_lock: object changed type")); + KASSERT(vp == object->handle, + ("vnode_pager_lock: vnode changed")); + return (vp); } return NULL; } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200210012018.g91KISoF078854>