From owner-p4-projects Tue Oct 1 13:18:31 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2BB0537B404; Tue, 1 Oct 2002 13:18:29 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CF92F37B401 for ; Tue, 1 Oct 2002 13:18:28 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8EF4643E42 for ; Tue, 1 Oct 2002 13:18:28 -0700 (PDT) (envelope-from jhb@freebsd.org) Received: from freefall.freebsd.org (perforce@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id g91KISCo078857 for ; Tue, 1 Oct 2002 13:18:28 -0700 (PDT) (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id g91KISoF078854 for perforce@freebsd.org; Tue, 1 Oct 2002 13:18:28 -0700 (PDT) Date: Tue, 1 Oct 2002 13:18:28 -0700 (PDT) Message-Id: <200210012018.g91KISoF078854@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin Subject: PERFORCE change 18494 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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