svn commit: r185431 - head/sys/kern

Pawel Jakub Dawidek pjd at FreeBSD.org
Sat Nov 29 04:40:14 PST 2008


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.


More information about the svn-src-all mailing list