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.
This commit is contained in:
parent
35a15332f3
commit
0c6a80e78d
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user