From owner-p4-projects@FreeBSD.ORG Tue Jul 1 08:50:45 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A20D8106568D; Tue, 1 Jul 2008 08:50:45 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63B211065687 for ; Tue, 1 Jul 2008 08:50:45 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 529308FC18 for ; Tue, 1 Jul 2008 08:50:45 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m618ojGa059198 for ; Tue, 1 Jul 2008 08:50:45 GMT (envelope-from hselasky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m618ojt1059196 for perforce@freebsd.org; Tue, 1 Jul 2008 08:50:45 GMT (envelope-from hselasky@FreeBSD.org) Date: Tue, 1 Jul 2008 08:50:45 GMT Message-Id: <200807010850.m618ojt1059196@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky To: Perforce Change Reviews Cc: Subject: PERFORCE change 144412 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jul 2008 08:50:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=144412 Change 144412 by hselasky@hselasky_laptop001 on 2008/07/01 08:50:14 Revert my changes. It appears that the "how" argument is not always passed on from unlock to lock like expected. The problem will be solved in another way. Affected files ... .. //depot/projects/usb/src/sys/kern/kern_mutex.c#10 integrate Differences ... ==== //depot/projects/usb/src/sys/kern/kern_mutex.c#10 (text+ko) ==== @@ -133,8 +133,7 @@ void lock_mtx(struct lock_object *lock, int how) { - if (how == 1) - return; + mtx_lock((struct mtx *)lock); } @@ -151,18 +150,6 @@ struct mtx *m; m = (struct mtx *)lock; - if ((m == &Giant) && (!mtx_owned(m))) { - /* - * Sometimes DROP_GIANT() gets in our way when we use - * the system condition variables passing the "Giant" - * mutex. If Giant is not locked when we get into this - * function then we can simply ignore those cases, - * because the locking is then handled by the DROP_XXX - * macros! - */ - return (1); - } - mtx_assert(m, MA_OWNED | MA_NOTRECURSED); mtx_unlock(m); return (0);