From owner-cvs-src@FreeBSD.ORG Tue Jan 8 23:48:32 2008 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C41316A419; Tue, 8 Jan 2008 23:48:32 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 2E6C813C457; Tue, 8 Jan 2008 23:48:32 +0000 (UTC) (envelope-from attilio@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 m08NmVFY058135; Tue, 8 Jan 2008 23:48:31 GMT (envelope-from attilio@repoman.freebsd.org) Received: (from attilio@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m08NmVb7058134; Tue, 8 Jan 2008 23:48:31 GMT (envelope-from attilio) Message-Id: <200801082348.m08NmVb7058134@repoman.freebsd.org> From: Attilio Rao Date: Tue, 8 Jan 2008 23:48:31 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/dev/usb ehci.c if_udav.c src/sys/fs/hpfs hpfs_subr.h src/sys/fs/ntfs ntfs_subr.c src/sys/kern kern_lock.c src/sys/sys buf.h lockmgr.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jan 2008 23:48:32 -0000 attilio 2008-01-08 23:48:31 UTC FreeBSD src repository Modified files: sys/dev/usb ehci.c if_udav.c sys/fs/hpfs hpfs_subr.h sys/fs/ntfs ntfs_subr.c sys/kern kern_lock.c sys/sys buf.h lockmgr.h Log: Remove explicit calling of lockmgr() with the NULL argument. Now, lockmgr() function can only be called passing curthread and the KASSERT() is upgraded according with this. In order to support on-the-fly owner switching, the new function lockmgr_disown() has been introduced and gets used in BUF_KERNPROC(). KPI, so, results changed and FreeBSD version will be bumped soon. Differently from previous code, we assume idle thread cannot try to acquire the lockmgr as it cannot sleep, so loose the relative check[1] in BUF_KERNPROC(). Tested by: kris [1] kib asked for a KASSERT in the lockmgr_disown() about this condition, but after thinking at it, as this is a well known general rule, I found it not really necessary. Revision Changes Path 1.57 +2 -2 src/sys/dev/usb/ehci.c 1.34 +2 -2 src/sys/dev/usb/if_udav.c 1.4 +4 -2 src/sys/fs/hpfs/hpfs_subr.h 1.43 +8 -8 src/sys/fs/ntfs/ntfs_subr.c 1.117 +42 -23 src/sys/kern/kern_lock.c 1.197 +1 -4 src/sys/sys/buf.h 1.56 +1 -0 src/sys/sys/lockmgr.h