From owner-svn-src-all@FreeBSD.ORG Sat Nov 29 12:40:14 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A42EB106564A; Sat, 29 Nov 2008 12:40:14 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9A3B68FC08; Sat, 29 Nov 2008 12:40:14 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mATCeEmu051277; Sat, 29 Nov 2008 12:40:14 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mATCeEd3051276; Sat, 29 Nov 2008 12:40:14 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <200811291240.mATCeEd3051276@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Sat, 29 Nov 2008 12:40:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r185431 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Nov 2008 12:40:14 -0000 Author: pjd Date: Sat Nov 29 12:40:14 2008 New Revision: 185431 URL: http://svn.freebsd.org/changeset/base/185431 Log: Improve KASSERT() call a bit: - Print flags in hex. - Note that flags can be fine and panic can be due unexpected error condition. - Remove redundant new line character. Eventhough panic message excess 80 characters keep it in one line so it is easier to grep. Modified: head/sys/kern/vfs_vnops.c Modified: head/sys/kern/vfs_vnops.c ============================================================================== --- head/sys/kern/vfs_vnops.c Sat Nov 29 12:32:42 2008 (r185430) +++ head/sys/kern/vfs_vnops.c Sat Nov 29 12:40:14 2008 (r185431) @@ -881,7 +881,8 @@ _vn_lock(struct vnode *vp, int flags, ch error = VOP_LOCK1(vp, flags, file, line); flags &= ~LK_INTERLOCK; /* Interlock is always dropped. */ KASSERT((flags & LK_RETRY) == 0 || error == 0, - ("LK_RETRY set with incompatible flags %d\n", flags)); + ("LK_RETRY set with incompatible flags (0x%x) or an error occured (%d)", + flags, error)); /* * Callers specify LK_RETRY if they wish to get dead vnodes. * If RETRY is not set, we return ENOENT instead.