mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-04 07:31:11 +00:00
Turn MPASS(0) into panic with more obvious reason why the assertion
is failed.
This commit is contained in:
parent
8120bb7e3a
commit
1fa8f5f051
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=174384
|
@ -154,7 +154,7 @@ tmpfs_alloc_node(struct tmpfs_mount *tmp, enum vtype type,
|
|||
break;
|
||||
|
||||
default:
|
||||
MPASS(0);
|
||||
panic("tmpfs_alloc_node: type %p %d", nnode, (int)nnode->tn_type);
|
||||
}
|
||||
|
||||
TMPFS_LOCK(tmp);
|
||||
|
@ -229,8 +229,7 @@ tmpfs_free_node(struct tmpfs_mount *tmp, struct tmpfs_node *node)
|
|||
break;
|
||||
|
||||
default:
|
||||
MPASS(0);
|
||||
break;
|
||||
panic("tmpfs_free_node: type %p %d", node, (int)node->tn_type);
|
||||
}
|
||||
|
||||
free_unr(tmp->tm_ino_unr, node->tn_id);
|
||||
|
@ -387,7 +386,7 @@ tmpfs_alloc_vp(struct mount *mp, struct tmpfs_node *node, int lkflag,
|
|||
break;
|
||||
|
||||
default:
|
||||
MPASS(0);
|
||||
panic("tmpfs_alloc_vp: type %p %d", node, (int)node->tn_type);
|
||||
}
|
||||
|
||||
vnode_pager_setsize(vp, node->tn_size);
|
||||
|
@ -799,7 +798,8 @@ tmpfs_dir_getdents(struct tmpfs_node *node, struct uio *uio, off_t *cntp)
|
|||
break;
|
||||
|
||||
default:
|
||||
MPASS(0);
|
||||
panic("tmpfs_dir_getdents: type %p %d",
|
||||
de->td_node, (int)de->td_node->tn_type);
|
||||
}
|
||||
d.d_namlen = de->td_namelen;
|
||||
MPASS(de->td_namelen < sizeof(d.d_name));
|
||||
|
|
Loading…
Reference in a new issue