vfs: assert that HASBUF is only set with SAVENAME or SAVESTART
as requested by the caller. The intent is to eradicate the mostly spurious NDFREE_PNBUF calls.
This commit is contained in:
parent
1e448a1558
commit
de0fcd3a44
@ -1384,6 +1384,7 @@ NDFREE_PNBUF(struct nameidata *ndp)
|
||||
{
|
||||
|
||||
if ((ndp->ni_cnd.cn_flags & HASBUF) != 0) {
|
||||
MPASS((ndp->ni_cnd.cn_flags & (SAVENAME | SAVESTART)) != 0);
|
||||
uma_zfree(namei_zone, ndp->ni_cnd.cn_pnbuf);
|
||||
ndp->ni_cnd.cn_flags &= ~HASBUF;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user