diff options
author | pjd <pjd@FreeBSD.org> | 2008-11-29 12:40:14 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2008-11-29 12:40:14 +0000 |
commit | 881f5f6bef889a5fc9f878e367245de363a1c55e (patch) | |
tree | cab54acb0b44c665bd1209bac2a88096d6d54487 /sys/kern/vfs_vnops.c | |
parent | 74ef0b3670af7a3aa46d90d809261b703e9117c5 (diff) | |
download | FreeBSD-src-881f5f6bef889a5fc9f878e367245de363a1c55e.zip FreeBSD-src-881f5f6bef889a5fc9f878e367245de363a1c55e.tar.gz |
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.
Diffstat (limited to 'sys/kern/vfs_vnops.c')
-rw-r--r-- | sys/kern/vfs_vnops.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 5453772..03b8ba1 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -881,7 +881,8 @@ _vn_lock(struct vnode *vp, int flags, char *file, int line) 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. |